Sunni rebels from an al Qaeda splinter group have overrun the Iraqi city of Tikrit and closed in on the biggest oil refinery in the country, making further gains in their rapid military advance against the Shia-led government.

The threat to the Baiji refinery comes after militants from the Islamic State in Iraq and the Levant (ISIL) seized the northern city of Mosul, advancing their aim of creating a Sunni Caliphate straddling the border between Iraq and Syria.

The fall of Mosul, Iraq's second biggest city, is a blow to Prime Minister Nuri al-Maliki's attempts to defeat the militants, who have seized territory in Iraq over the past yearfollowing the withdrawal of US forces.

About 500,000 Iraqis have fled Mosul, home to two million people, and the surrounding province, many seeking safety in the autonomous Kurdistan region.

UN Secretary-General Ban Ki-moon has urged the international community to unite behind Iraq as the armed jihadists swept closer to Baghdad.

The UN chief demanded "full respect for international humanitarian law and human rights law in efforts to counter terrorism and violence in Iraq," spokesman Stephane Dujarric added.

Mr Ban strongly condemned the surge in violence and warned that "terrorism must not be allowed to succeed in undoing the path toward democracy in Iraq."

Mr Dujarric said more than 2,500 families are displaced inside Mosul, mostly living in schools and mosques, and an estimated 100,000 have entered Arbil, capital of the autonomous Kurdish region in northern Iraq.

UN Refugee Agency UNHCR is on the ground mobilising tents with essential relief items, including water and sanitation, being delivered.

The insurgents are now in control of between 10 and 15% of Iraqi territory, excluding Kurdistan, and have led many Iraqis to fear they have the capital, Baghdad, in their sights.

Security sources said ISIL militants today drove more than 60 vehicles into Tikrit, the home town of former Iraqi dictator Saddam Hussein, occupying the provincial government headquarters and raising the black flag of ISIL.

Around 100 ISIL fighters held mass prayers in central Tikrit after taking control.

Foreign Minister Hoshyar Zebari said Iraq's leaders must unite to face a "mortal" threat. "There has to be a quickresponse to what has happened," he said during a trip to Greece.

Mr Zebari said Baghdad would work with forces from Kurdistan inthe north to drive the fighters out of Mosul after Iraqi security forces there fled yesterday.

Prime Minister Maliki described the fall of Mosul as a "conspiracy" and said those who had abandoned their posts would be punished. He also said Iraqis were volunteering in several provinces to join army brigades to fight ISIL.

In a show of the militants' reach, a car bombing in a crowded market in the town of Safwan, which sits on Iraq's southernmost border with Kuwait, killed five people.

In a statement on its Twitter account, ISIL said it had taken Mosul as part of a plan "to conquer the entire state and cleanse it from the apostates", referring to the province of Nineveh of which the city is the capital.

Militants executed 10 soldiers and policemen near the town of Riyadh, 60km southwest of Kirkuk,after setting up a checkpoint on the road, police sources said,while in Tikrit six police officers were executed.

ISIL has become a dominant player in Iraq and Syria, where it has seized a string of cities over the past year, often fighting other Sunni groups.

The United States expressed concern about the deteriorating security situation in Iraq and pledged "any appropriate assistance" to help the Iraqi government.

ISIL control in the Sunni Anbar province as well as around Mosul would help the Islamist group consolidate its grip alongthe frontier with Syria, where it is fighting President Basharal-Assad, an ally of Shia Iran.

Members of Iraq's Shia majority have also been crossing the border to fight in Syria alongside Assad's forces.

In Sadr city, a Shia section in Baghdad, men were stockpiling weapons in anticipation of a battle against ISIL.

At about the same time, a suicide bomber blew himself up in Sadr City, killing at least 38 people. A further 18 people were killed when a car bomb exploded near the northern Kadhimiya district, where there is a Shia shrine.

The International Organisation for Migration said its sources on the ground estimated the violence leading up to ISIL's takeover of Mosul "displaced over 500,000 people in and around the city".

Vehicles have been banned from the city centre, and people are being forced to flee on foot in the face of indiscriminate shelling.

Neighbourhoods in the west of the city have been hit by a lack of drinking water after the main water station in the area was destroyed by bombing, and many families are facing food shortages, the IOM said.

IOM said it and other international organisations had received appeals from local Iraqi authorities for help dealing with the situation.

Insurgents have also seized the Turkish consulate in Mosul and kidnapped the head of the diplomatic mission and 47 other people, a Turkish government official said.

The seizure of the consulate means at least 76 Turks are now being held by militants in Mosul after 28 Turkish truck drivers were abducted by ISIL militants while they were delivering diesel to a power plant in the city.

Turkey has close trade and political links with the Kurdish-controlled area to the north of Mosul that has not, for the moment at least, been targeted by ISIL. It sees a particular role in protecting the interests of the Turkish ethnic minority in that area.

Jihadists are firmly in control of Mosul, patrolling the streets and calling for employees to return to work a day after seizing the northern city.

Gunmen, some in military uniforms and others wearing black, stood guard at government buildings and banks, said witnesses reached by telephone from Bashiqa, a town east of Mosul.

They called over loudspeakers for government employees to go back to work.

Jihadists seized all of Mosul and Nineveh province, long a militant stronghold and one of the most dangerous areas in the country, and also took areas in Kirkuk province, to its east, and Salaheddin to the south.

This video, uploaded to YouTube yesterday, appears to show the city of Mosul under the control of the militants.

Abandoned vehicles of government forces are in flames on the streets and fighters are seen roaming the city in pickup trucks.

ISIL said it was behind operations in Nineveh in a series of messages on Twitter, while officials have also blamed the jihadist Sunni group for the unrest.

But it is possible that other militant groups have been involved as well.

Bloodshed is running at its highest levels in Iraq since 2006-2007, when tens of thousands were killed in clashes between the country's Shia majority and Sunni Arab minority.

It has controlled the Iraqi city of Fallujah since December and has won territory in neighbouring Syria.

Powerful Shiite cleric Moqtada al-Sadr, who led the once-feared Mahdi Army militia, has called for the formation of units to defend religious sites in Iraq.

Mr al-Sadr said in a written statement that he was ready "to form peace units to defend the holy places" of both Muslims and Christians, in co-operation with the government.

His call came after Prime Minister Maliki said the government would arm citizens who volunteer to fight militants, following the fall of Mosul.

US State Department spokeswoman Jen Psaki said the takeover of Iraq's second biggest city in the last 48 hours by forces from the Islamic State of Iraq and the Levant showed the deterioration of security in the country.

Washington has supplied large amounts of weaponry to Iraq since pulling its forces out in 2011, but Baghdad has failed to heal festering sectarian and political divisions and to curb instability spilling over from the Syrian civil war.