by Ammar Karim and Luigi Serenelli, Special for USA TODAY

by Ammar Karim and Luigi Serenelli, Special for USA TODAY

BAGHDAD - Iraq's second-largest city of Mosul fell to an al-Qaeda splinter group Tuesday, a major blow to the government's battle against a widening insurgency.

Prime Minister Nouri al-Maliki asked the parliament to declare a national state of emergency, and he proposed arming civilians in the restive northern areas after the militants seized parts of Mosul.

"We won't allow Mosul to surrender to terrorism," al-Maliki vowed at a nationally televised news conference. "We will arm those who wish to defend our homeland and defeat terrorists."

Overnight Tuesday, insurgents captured key government buildings and forced security forces into a retreat in the key northern city.

The militants -- part of the Islamic State of Iraq and Levant (ISIL) group, which is also fighting the regime in Syria -- torched buildings and drove out residents and security forces.

The gains came after days of fierce fighting in the former al-Qaeda base that ISIL has tried to retake and have led to alarm over a widening conflict that is spilling over from the civil war in Syria.

Insurgents already are in control of Sunni-populated western areas of Iraq and swathes of western Anbar province including the city of Fallujah and contested Ramadi.

Iraq has been racked by sectarian violence not seen since 2006. Nearly 9,000 people were killed in 2013, according to the United Nations. Preliminary numbers by independent U.K.-based watchdog group, Iraq Body Count, estimated nearly 4,000 died through April of this year.

The United States has been funneling tons of weapons into Iraq -- including sniper rifles, tank rounds and missiles -- to help the government fend off the militants' assaults, but the country's U.S.-trained military has not been able to dislodge them.

Most Sunnis do not support the insurgents but resent al-Maliki's Shiite-led government because they believe it excludes Sunnis, conducts indiscriminate violence and is riddled with corruption, Iraq analysts say.

"This experience of marginalization, politically but also economically and socially has led many Sunnis at least to give up the fight against al-Qaeda and the fight against insurgent groups in the western parts of the county," said Guido Steinberg, an analyst who specializes on the Middle East and Africa at the German Institute for International and Security Affairs in Berlin. "And that is the reason why we see an organization like the Islamic State in Iraq and Syria gaining such prominence."

"They will be able to cause big problems for the Iraqi government, for the security forces, who are highly corrupted and do not seem to have the motivation to fight Al-Qaeda," Steinberg added.

Parliament speaker Osama al-Nujaifi, a Sunni from Mosul, warned in a televised address that terrorist control of Mosul threatens "the security and unity of Iraq but also threatens all neighboring countries and the Middle East."

Mosul is a strategic prize. The city and surrounding Ninevah province are a major export route for Iraqi oil and a gateway to Syria.

During the nearly nine-year U.S. troop presence in Iraq, Mosul was a major stronghold for al-Qaeda and U.S. and Iraqi forces carried out repeated offensives there, regaining a semblance of control but never routing the insurgents entirely.

On Tuesday, Mosul residents said the militants appeared to be in control of several parts of the city, raising the black banners that are the emblem of the Islamic State.

"I saw how the militants attacked the airport and how the army withdrew without fighting and then they went toward the provincial building and attacked it," said Samer Ahmed, 34, of the Gizlani district of Mosul. "You can't see any presence of any Iraqi forces â?? they all left or were killed and as I was going through the city to get my family out, a lot of army uniforms were left in the streets."

"Mosul is now a ghost city and only masked militants are sweeping through the streets â?? everything is burning in the city," Ahmed said.

Haider Ahmad was working in his store when he heard heavy gunfire. When he went outside to check, he said he saw "a lot of young men who came out of houses and start to attack the army post nearby. "After a while, the soldiers started taking off their uniforms and disappeared totally," he said.

Now the concern is where to find safety, said fleeing residents. On Tuesday, the Kurdish authorities announced the opening of a new refugee camp on the border between Nineveh and Arbil for those fleeing the violence.

"I was shock when I saw the ISIL fighters with their long beard and long hair and Afghan clothes," said Mosul resident Ali Gailan. "They didn't hurt us when we saw them but we were very scared. ...They will show they are nice now but later when they control everything, they will resume their murdering ways."