BAGHDAD — Iraqi authorities are determined to recapture the northern city of Mosul after most of it was overrun by al-Qaida-inspired militants, the provincial governor said Wednesday after he fled the city along with half a million other residents.

The stunning assault by the al-Qaida-inspired group saw black banner-waving insurgents raid government buildings, push out security forces and capture military vehicles as residents fled for their lives from what is Iraq’s second-largest city.

“Mosul is capable of getting back on its feet and getting rid of all the outsiders … and we have a plan to restore security,” said Atheel al-Nujaifi, the Ninevah provincial governor. “We have taken practical steps in order to restore order … by mobilizing people into public committees that would retake the city.”

Mosul, with over 1.5 million residents, is the capital of Ninevah province, which along with the neighboring Sunni-dominated province of Anbar shares a long and porous border with Syria.

There were no immediate estimates on how many people were killed in the assault but the rampage by the militants sent an estimated 500,000 people fleeing from the city, according to the International Organization for Migration.

Iraq’s Foreign Minister Hoshyar Zebari said the fall of the major northern city to insurgents must push the country’s leaders to work together and deal with the “serious, mortal threat” facing Iraq.

Zebari made the comments in Athens on the sidelines of a meeting of European Union and Arab League foreign ministers. He said Iraqi troops and Kurdish forces belonging to the largely autonomous northern Iraqi Kurdish region could work together to push the insurgents out of Mosul, though it was not clear what if any specific plans on cooperation were in the works.

“We can push back on the terrorists … and there would be a closer cooperation between Baghdad and the Kurdistan Regional Government to work together and try to flush out these foreign fighters or elements who have disturbed the safety, the well-being of the population,” he said.

Mosul residents reached Wednesday said gunmen went around knocking on their doors, reassuring locals they would not be harmed and urging civil servants to return to work. The situation appeared calm but tense, said the residents, who spoke on condition of anonymity out of concerns for their safety.

In an eastern section of the city, 34-year-old Ali Sameer said mosques in his neighborhood were calling on people to return to work, especially those in public services.

Mosul’s fall was a heavy defeat for Prime Minister Nouri al-Maliki amid a widening insurgency by the Islamic State of Iraq and the Levant.

The group has been advancing in both Iraq and neighboring Syria, capturing territory in a campaign to set up a militant enclave straddling the border.

Al-Maliki has pressed parliament to declare a state of emergency over the Mosul attack.

Al-Nujaifi, the governor of Ninevah, also accused senior security force commanders of providing Baghdad with false information about the situation in Mosul and demanding that they should stand trial.

Speaking from the northern Kurdish city of Irbil where he took refuge after leaving Mosul, he said smaller armed groups had joined the Islamic State during the fight for control of the city.

Elsewhere in Iraq on Wednesday, a car bomb struck Shiite pilgrims heading to the holy city of Karbala, killing four people and wounding 10. Police said a car bomb blast killed three people and wounded 12 in a town just south of Baghdad.

Medical officials confirmed the casualties for all attacks. All officials spoke on condition of anonymity because they were not authorized to speak to the media.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.