Updated

The Iraqi soldiers tell of how they can hardly live with the shame of their rout under the onslaught of the Islamic militants. Their commanders disappeared. Pleas for more ammunition went unanswered. Troops ran from post to post only to find them already taken by gunmen, forcing them to flee.

"I see it in the eyes of my family, relatives and neighbors," one lieutenant-colonel who escaped the militants' sweep over the northern city of Mosul told The Associated Press. "I am as broken and ashamed as a bride who is not a virgin on her wedding night."

Iraq's military has been deeply shaken by their collapse in the face of fighters led by the al-Qaida breakaway group Islamic State of Iraq and the Levant, who in the course of just over a week overran Mosul then stormed toward Baghdad, seizing town after town, several cities and army base after army base over a large swath of territory.

The impact is hurting efforts to rally the armed forces to fight back. Shiite militiamen and volunteers have had to fill the void as the regular army struggles to regroup.

Top commanders have been put under investigation. Conspiracy theories are running rampant to explain the meltdown. Some Shiite allies of Prime Minister Nouri al-Maliki have accused Kurds in the north of encouraging the military collapse so they could grab territory and weapons for themselves — an accusation that they've provided no proof for but that is straining already tense ties with the Kurdish autonomous zone, where officials deny the claim.

On Tuesday, al-Maliki retired three generals who had been deployed in Mosul and ordered legal proceedings against them. He also dismissed a brigadier general and ordered his court martial in absentia. He said he planned to retire off or court martial more senior officers, but gave no details.

Already he had ordered the questioning of the military's Chief of Joint Operations Gen. Abboud Gambar and the ground forces commander Gen. Ali Gheidan, according to security officials who spoke on condition of anonymity because of the sensitivity of the subject. The two face no charges and no legal action has been taken against them.

Al-Maliki has also vowed to bring the full weight of military law, including the execution of deserters, on anyone who is found out to have fled the battle.

Al-Maliki is trying to turn the armed forces around. He told army commanders and volunteers in a rally south of Baghdad this week that the rout served as a much needed wake-up call. He said it would lead to the exposure and punishment of military commanders and politicians he accuses of betraying their country. He has also cryptically blamed conspiracies, acts of treachery and meddling Arab nations.

The blow was particularly harsh in a country that has traditionally prided itself on the prowess of its soldiers, with the faith of its Shiite majority immersed in a narrative of martyrdom that is rooted in the fabled bravery of its saints.

In an attempt to restore faith in the armed forces, state-run Iraqiya television has been airing little over the past week besides clips of troops and police marching or in action, helicopters strafing what is purportedly militants' positions and soldiers and policemen performing traditional dancing with civilians.

Members of the political coalition led by al-Maliki openly accused the Kurdish self-rule government of collusion with the Islamic militants in the capture of Mosul, Iraq's second-largest city, by doing nothing to prevent its fall. They said Kurdish fighters illegally seized large quantities of weapons and equipment left behind by fleeing Iraqi troops.

After the seizure of Mosul, Kurdish fighters deployed in the vital oil city of Kirkuk in the north and parts of Diyala province northeast of Baghdad that the Kurds have long claimed as their own.

Al-Maliki's allies have not produced evidence to back up their claims, which the Kurds categorically denied. The Kurds say they moved into the areas to protect them after Iraqi government forces left. Otherwise, Islamic State fighters would have taken them, they argue.

And in what seemed an implicit dig at the military's rout, the prime minister of the Kurdish region, Nechirvan Barzani, dismissed Baghdad's charges as "running away from the truth."

The breakdown is rooted in multiple factors. Even after the United States spent billions of dollars training the armed forces during its 2003-2011 military presence in Iraq, the 1 million-member army and police remain riven by sectarian discontents, corruption and a lack of professionalism.

The territory that the Islamic State has captured has an overwhelmingly Sunni population, where resentment is high against al-Maliki's Shiite-dominated government because of what they see as discrimination against their communities. Sunnis in the armed forces are hesitant to be seen fighting for al-Maliki, and Shiite troops deployed in Sunni areas feel isolated and vulnerable amid hostile territory. Morale in the military is already low in a battle against a Sunni insurgency that has grown the past two years, with desertions rife, particularly by Sunnis.

At the time Islamic State fighters overran Mosul a week ago, there were about 50,000 federal and regular local police in the city and two army divisions totaling about 24,000 troops. The federal police were largely Shiites, the locals mainly Sunnis from Mosul. One of the army divisions was mixed Sunni-Shiite and the other was mainly composed of Kurds.

Among the troops who escaped Mosul, the humiliation hits deep.

The lieutenant colonel, a Shiite who spoke to the AP on condition of anonymity because of fears of reprisals, had been stationed in an air base in Mosul. They received orders to pull out and fall back to their division headquarters, but when they got there they found it had already been captured by militants who were looting its arsenals. So he and his comrades fled to the city of Kirkuk, to the southeast, then proceeded to Baghdad.

He said they were detained briefly at a checkpoint near Baghdad and questioned by other soldiers why they fled — a further shame.

"I have been fighting in Mosul for five years, we never ran away. Some of us were killed and injured, but we never ran away," he said. "Now, people tell me we are cowards, can you imagine? I cannot sleep. Death is more merciful."

Montazar al-Rubiae, a member of the paramilitary federal police force in Mosul, said his unit battled for 18 hours against militant fighters in Mosul until they ran out of ammunitions. Their calls for reinforcements and ammunition went unanswered. They pulled back to their headquarters, where they heard other federal police had fled, putting on civilian clothes and abandoning their weapons. His unit redeployed and fought more, but then pulled back to a checkpoint on Mosul's southern outskirts — which they too found already taken by militants.

They received orders to withdraw — and the commander of his brigade and his top aides quickly left in three pickup trucks. "When we tried to get a lift with them, they just drove on in the direction of Irbil," he said, referring to the nearby capital of the Kurdish autonomous zone.

Then the remains of his unit came under attack, prompting them to change into civilian clothes and flee for Kurdish areas.

"They came out from everywhere and started hunting us one after the other, like birds," he said.