ERBIL, Iraq — Last week, the Iraqi military looked pretty bad.

As Al Qaeda-inspired militants swept northern Iraq, state security forces fled, some even stripping their uniforms off in order to avoid being identified.

But they didn't flee out of cowardice, they say, or lack of discipline. They fled their base in Mosul because they had no choice.

Deserters, speaking this week from the relative safety of Iraq's Kurdish region east of Mosul, said their commanders abandoned them. They had only one option, and that was to surrender.

"We had everything, all the necessary equipment, training, but we didn't have a leader," a soldier who asked to be called Hussein said Monday.

His brigade, stationed in northern Iraq for the last nine years, completely dissolved last week after the province's governor and many of the military's top leadership unexpectedly fled.

Hussein says he believes they were paid off by the Islamic State of Iraq and the Levant (ISIL), who led the charge in northern Iraq.

When Ahmed, a fellow soldier, heard a rumor that his commanders had vanished last week, he didn't believe it.

"We tried to make sure by calling them," he said, adding that he called their cell phones and designated military lines. "But we couldn't get in touch."

For nearly four days, Ahmed and hundreds of other soldiers held their positions, fighting back militants and hoping Baghdad would send a new commander or reinforcements. None came and government airstrikes were getting closer.

Ahmed says he and his unit had a choice: surrender to ISIL or to Kurdish security forces. They chose the latter.

Back on their feet

Nearly a week after the militants launched their push in the north, the Iraqi military is regrouping. They are calling deserters to Baghdad and planning a push on Tikrit to the north.

Hussein and Ahmed say they want nothing more than to return to their posts. They are running out of money in Erbil, and starting to feel guilty about fleeing in the first place.

On Monday, the pair waited with a few dozen other soldiers in front of the Iraqi Airways office, where they heard the government was giving deserters free, one-way tickets to Baghdad.

Also waiting outside the office were families and businessmen, Iraqis from Baghdad and Basra who just happened to be in Erbil on vacation last week when the violence erupted. Now that the roads south of Erbil are severed by violence, flying is their only way to get home.

Inside the air-conditioned Iraqi Airways offices, Hakiki, a Kurdish travel agent, said he is overwhelmed.

"It's just crazy, they begin to show up at 5 in the morning and stay till 10 in the night. Some sleep here," he said, his voice strained.

Hakiki estimated his office has issued more than a thousand tickets to deserters already. He said he heard the government might charter a private plane for the rest.

"There is a chance for everybody, soldiers or even for policemen to be with us again," said Saad Maan, Iraq's Ministry of Interior spokesman, referring to government efforts to fly deserters to the capital.

"There was bad circumstances for them so of course there is a chance for them to rejoin our troops," he said by phone from Baghdad.

Maan said troops will gather in Baghdad before pushing north to Tikrit and eventually on to Mosul.

Iraqi Prime Minister Nouri al-Maliki sends a different message. He has threatened deserters with apparent execution.

"Those who did nothing and those who clearly abandoned their posts, let them not imagine that they escaped," he said in a televised address over the weekend. "Frankly this is our chance to get rid of the cowards and weaklings. This is our opportunity to improve the army and purify it from these elements."

An Iraqi military colonel, who asked to remain anonymous because he was not authorized to speak to the press, says the military does not consider soldiers who fled after being abandoned by their superiors to be deserters.

"They had to [flee]. Their commander left and their lives were in danger, they had no orders to fight," he said by phone from his base in Kirkuk. The mass desertions in Mosul are being treated as a political issue, not a strategic or military problem, he said.

Soldiers outside the Iraqi Airways office in Erbil said they wouldn't think of running again.

"We learned a lesson," said Ghassan, a soldier from Samara in Ahmed's unit. "Now we know our enemy." Plus, he says, he is now more passionate about the fight.

"Before, it was simply an order from the military, but now it's an order of jihad from Sistani," he said, referring to Iraq's highest-ranking Shiite cleric Ayatollah Ali al-Sistani, who issued a call to arms to topple the Al Qaeda-inspired fighters.

On the dusty outskirts of Erbil, a group of soldiers, also deserters, lounge under a tent in a displaced persons' camp. They don't have the proper documents to score a free ticket to Baghdad, so instead they have registered with a nearby Iraqi military base.

After boasting about how they fended off militants for days in Mosul, the men admit they're itching to return to the battlefield.

"I was so happy and excited when I went to register my name to go back [to Mosul]," said a deserter, also named Ahmed. He thought he'd be able to return to fighting that same day, but was told to return to his tent at the camp and wait to be called. "All I'm doing is waiting," he said.

These men say Sistani's call to arms doesn't matter to them. They're Sunni, the same sect as the extremists sweeping the north.

"Our relatives are in [Mosul]," Ahmed said, "I want to go back, take my weapon, defend my family and get our lives back."

Further on down the road at the base where soldiers are registering their names, Gen. Hammad Dizayee of Iraq's Fifth Brigade described the mass desertions as a fluke.

"That was all politics," he said, calmly brushing off criticism that the military lacks cohesion and discipline. "We were in battles before, this isn't something new for us."