KIRKUK (AFP) - Militants seized the Iraqi city of Tikrit on Wednesday but security forces thwarted an assault on Samarra as a lightning jihadist offensive launched in second city Mosul swept closer to Baghdad.
Since the Islamic State of Iraq and the Levant began its spectacular assault in Mosul late on Monday, militants have captured a large swathe of northern and north-central Iraq, prompting as many as half a million people to flee their homes.
The speed with which ISIL and its allies have advanced after their seizure on Tuesday of Mosul -- a city of two million people -- has sent alarm bells ringing in Western capitals.
It has also triggered a hostage crisis for Ankara, which threatened harsh reprisals if 49 Turks seized by the jihadists at its consulate in the main northern city were harmed in any way.
Tehran and Washington, which despite their many differences have a shared interest in preventing Iraq following neighbouring Syria into all-out civil war, both pledged more aid to Baghdad.
ISIL vowed on Twitter that it would "not stop this series of blessed invasions" that has seen the fall of the whole of Nineveh province in the north and swathes of Kirkuk and Saleheddin provinces further south.
Tikrit -- hometown of executed dictator Saddam Hussein -- was the second provincial capital to fall in as many days as the jihadists and their allies captured a string of mainly Sunni Arab towns where resentment against the Shiite-led government runs deep.
"All of Tikrit is in the hands of the militants," a police colonel said of the Salaheddin provincial capital, which lies half way between Baghdad and Mosul.
Another officer said the militants had freed some 300 inmates from a prison there.
After Tikrit's fall, the operation spread down the main highway towards Baghdad, with militants battling security forces on the northern outskirts of Samarra, just 110 kilometres (70 miles) from the capital.
State television said security forces responded with air strikes, and residents said the fighting subsided without the militants entering the city.
Militants had already tried to seize the city late last week, and were halted only by a massive deployment of troops, backed by tribal militia and air power.
Samarra is mainly Sunni Arab but is home to a shrine revered by the country's Shiite majority, whose bombing by Al-Qaeda in 2006 sparked a Shiite-Sunni sectarian conflict that left tens of thousands dead.
The lightning advance poses significant challenges to Baghdad, with the New York-based Eurasia Group risk consultancy saying jihadists would be bolstered by cash from Mosul's banks, hardware from military bases and hundreds of men they freed from prison.
In his weekly address Wednesday, Prime Minister Nuri al-Maliki merely renewed his call to arm civilians to resist the jihadists.
Maliki urged Nineveh's residents "and its tribes to stand with the army and police."
Washington has warned that ISIL threatens the entire region and promised more aid for the Baghdad government.
State Department spokeswoman Jen Psaki said the US was committed to "working with the Iraqi government and leaders across Iraq to support a unified approach against ISIL's continued aggression."
In Tehran, Foreign Minister Mohammad Javad Zarif said Shiite Iran "offers its support to the government and people of Iraq against terrorism."
The swift collapse of Baghdad's control, which comes on top of the loss of Fallujah, west of Baghdad, at the start of the year, has been a blow for Western governments that invested lives and money in the invasion that toppled Saddam in 2003.
However, Foreign Secretary William Hague said there was "no question" of British troops being sent back to Iraq.
The International Organisation for Migration said sources in Mosul estimated the violence leading up to the jihadists' takeover "displaced over 500,000 people in and around the city."
On Wednesday, gunmen in military uniforms and all-black clothing guarded government buildings and banks in the city, residents told AFP by telephone.
Militants stormed the Turkish consulate and kidnapped 49 people including the head of the mission and three children, a Turkish official said.
They were in addition to 31 Turkish truck drivers seized by ISIL at a Mosul power station.
The hostage-taking drew a stark warning from Foreign Minister Ahmet Davutoglu.
"All those involved should know that if our citizens are harmed in any way, they will be the subject of harsh reprisals," he said.
Bassam Mohammed, a 25-year-old student, said he would not join the exodus of residents leaving Mosul but acknowledged deep concern about how the jihadists would run the city.
"I am afraid about freedoms, and I am especially afraid that they will impose new laws on us," he said.
Known for its ruthless tactics and suicide bombers, ISIL is arguably the most capable force fighting President Bashar al-Assad inside Syria as well as the most powerful militant group in Iraq.
In a show of its determination to unite its thousands of fighters in the two countries, the group posted photographs on the Internet of militants bulldozing the border berm to open a road.
The Syrian government said it was ready to help Baghdad in its fight against "terrorism," while the rebel Free Syrian Army called for support from Arab states for its own battle against ISIL.