* Attack deals major blow to Baghdad government
* US offers help, Baghdad looks to Kurds for troops
* City's capture follows days of fighting
* Military base overrun and prisoners freed
By Ziad al-Sinjary
MOSUL, Iraq, June 10 (Reuters) - An al Qaeda splinter group seized control of the Iraqi city of Mosul on Tuesday, putting security forces to flight in a spectacular show of strength against the Shi'ite-led Baghdad government.
The capture of the northern city of 2 million by the Islamic State of Iraq and the Levant - Sunni Muslims waging sectarian war on both sides of the Iraqi-Syrian frontier - complements ISIL's grip on key western towns and followed four days of heavy fighting in Mosul and the border province of Nineveh around it.
The United States, which pulled out its troops two and a half years ago, pledged to help Iraqi leaders "push back against this aggression" as the government of Prime Minister Nuri al-Maliki asked parliament to declare a state of emergency that would give him extraordinary powers to tackle the crisis.
But the battle, for the time being, seemed to be over. Some police were discarding uniforms and weapons and fleeing a city where the black flag of ISIL now flew over government buildings.
"We have lost Mosul this morning," said a colonel at a local military command centre. "Army and police forces left their positions and ISIL terrorists are in full control.
"It's a total collapse of the security forces."
A Reuters reporter saw the bodies of soldiers and policemen, some of them mutilated, littering the streets.
"We can't beat them. We can't," one officer told Reuters. "They are well trained in street fighting and we're not. We need a whole army to drive them out of Mosul.
"They're like ghosts: they appear, strike and disappear in seconds."
The fall of Mosul, a largely Sunni Arab city after years of ethnic and sectarian fighting, deals a serious blow to Baghdad's efforts to fight Sunni militants who have regained ground and momentum in Iraq over the past year, taking Falluja and parts of Ramadi in the desert west of Baghdad at the start of the year.
Control there, in Anbar province, as well as around Mosul in the north, would help ISIL and its allies consolidate control along the barely populated frontier with Syria, where they are fighting President Bashar al-Assad, an ally of Shi'ite Iran.
A White House spokesman renewed U.S. calls for Maliki to do more to address grievances among Iraqis, notably the once dominant Sunni minority. Many Sunnis feel disenfranchised and some have made common cause with foreign Islamist radicals, first against the U.S. troops that overthrew Sunni dictator Saddam Hussein in 2003 and now Shi'ite-led Iraqi forces.
MOSUL IS "HELL"
Thousands of families were fleeing north from Mosul, one of the great historic cities of the Middle East, towards the nearby Kurdistan region, where Iraq's ethnic Kurds have autonomy and their own large and disciplined military force, the Peshmerga.
"Mosul now is like hell. It's in flames and death is everywhere," said Amina Ibrahim, who was leaving with her children. Her husband had been killed last year, in a bombing.
In a statement, the U.S. State Department said it was "deeply concerned" and had senior officials in Baghdad and Washington monitoring events in coordination with the Iraqi government, Kurdish officials and other Iraqi figures. It said Washington would "support a strong, coordinated response".
"The United States will provide all appropriate assistance to the government of Iraq," it added, saying that its use of arms and fighters from Syria showed "ISIL is not only a threat to the stability of Iraq, but a threat to the entire region".
Some officials in Baghdad spoke of seeking help for Mosul from Kurdish Peshmerga, which have long been a force in the jockeying between Shi'ites, Kurds and Sunnis for influence and, especially, for control of oilfields in the north of Iraq.
A Peshmerga spokesman said some Kurdish troops were helping Iraqi forces guard the Syrian border crossing at Rabia.
President Barack Obama has been criticised by some at home for neglecting Iraq and letting U.S. adversary Iran extend its influence there. Washington has stepped up the supply of arms, however, notably since the rise of Islamist rebels in Syria led to a new impetus for Maliki's Sunni enemies in Iraq.
However, Iraqi police, military and security officials told Reuters the insurgents, armed with anti-aircraft weapons and rocket-propelled grenades, had taken over almost all police and army checkpoints in and around Mosul early on Tuesday.
Two army officers said security forces had received orders to quit Mosul after militants captured the Ghizlani army base and set more than 200 inmates free from a high-security prison.
Two police sources and a local government official said the militants had also broken into another jail called Badush, allowing more than 1,000 prisoners to escape. Most of these, they said, belonged to ISIL and al Qaeda. The army and police set fire to fuel and ammunition depots as they retreated to prevent the militants from using them, the officers said.
Further south, at Hawija in Kirkuk province, the head of the local council, Hussein Ali al-Saleh, said scores of Islamist militants drove into town, putting troops and police to flight.
ISIL, led by Abu Bakr al-Baghdadi, broke with al Qaeda's international leader, Osama bin Laden's former lieutenant Ayman al-Zawahri, and has clashed with al Qaeda fighters in Syria.
ISIL posted photographs of its fighters wearing black balaclavas on its "Nineveh State" Twitter account, interspersed with verses from the Koran. The group dubbed the Mosul offensive "Enter Upon Them Through The Gates".
In a newsletter, ISIL enjoined Sunnis to join them in the fight against Maliki's "Safavid" army - a reference to the Persian dynasty that promoted Shi'ite Islam.
"Join the ranks oh brothers!" ran one slogan. "Maliki's tyrannical strength no match for pious believers."
"EVEN THE DEAD SUFFER"
Ibraheem al-Sumeide'i, a former adviser to Maliki who fell out with him over policy, said the prime minister should make way for a government of national unity: "The fall of Mosul into the hands of ISIL means that ISIL has unified the Iraqi and Syrian front and they have achieved their goal," he said.
Some Iraqi security sources estimate more than a thousand mainly Shi'ite troops have been killed and many more deserted from the army, as regular soldiers complain their leadership has not provided them with the equipment and training.
Militants also control the Qayara district near Mosul, where there is a military base and an airfield, security sources said.
In the neighbouring province of Salahaddin, they overran three villages in the Shirqat district, torching police stations, town halls and local council buildings before raising ISIL's banner. Over loudspeakers, insurgents said residents - and the police - would be safe if they remained in their homes.
On Monday, Nineveh provincial governor Atheel Nujaifi made a televised plea to the people of Mosul to stand their ground and fight. Hours later, Nujaifi himself narrowly escaped the provincial headquarters in the city after militants besieged it.
Nujaifi's brother Osama, who is speaker of the parliament in Baghdad, called on the Kurdish leadership to sent their Peshmerga forces to Mosul and wrest it back from "terrorists".
Kurdistan Prime Minister Nechirvan Barzani said his region had tried to coordinate with Iraqi federal authorities to protect Mosul, but Baghdad's stance had made it impossible.
Nearly 800 people were killed in violence across Iraq in May - the highest monthly death toll so far this year. Last year was the deadliest since the sectarian bloodletting of 2006-07.
At least 20 people were killed on Tuesday when two bombs exploded at a cemetery in the city of Baquba about 50 km (30 miles) northeast of Baghdad, as mourners buried a university professor shot dead the previous day, police and medics said.
"Mourners' bodies were flung among the graves by the force of the blasts," said Muhsin Farhan, a relative of the professor.
"Even the dead are suffering in Iraq." (Additional reporting by Ahmed Rasheed, Raheem Salman and Isra al-Rubei'i in Baghdad; Writing by Isabel Coles; Editing by Samia Nakhoul, Giles Elgood and Alastair Macdonald)