One hot and sticky evening in July, in the dying days of the battle for Mosul, a group of Iraqi army officers sat for dinner in a requisitioned civilian house not far from the ruins of the mosque where, three years earlier, the leader of Islamic State had announced the creation of a new caliphate.

At the head of the table sat the commander, large and burly, flanked by his two majors. The rest of the officers were seated according to rank, with the youngest officers placed at the far end. The commander, who was trying to lose weight, had banned his cook from serving meat at mealtimes, but tonight was a special occasion. The day before, his unit had liberated another block of streets in the Old City without suffering any casualties. In celebration, a feast of bread soaked in okra stew, and roasted meat shredded over heaps of rice flavoured with nuts and raisins, was laid out on a white plastic table.

After the liberation of Mosul, an orgy of killing – podcast Read more

Over the previous eight months, since the commander and his men had started fighting in Mosul, the caliphate had shrunk to a tiny sliver of the Old City squeezed between the River Tigris and advancing columns of army and police forces. Thousands of Isis fighters, who captured the city in 2014, were now trapped, living without running water or electricity, with dwindling supplies of food and medicine, being bombed day and night by US drones and jets. Caught in the siege with them were thousands of civilians. The few who were managing to escape came out filthy, emaciated and crazed by thirst and the constant bombing.

The officers at dinner that night were all veterans of the war against Isis, but nothing in their long years of fighting compared to what they had experienced over the past few weeks in Mosul, one of the fiercest urban battles since the second world war. They fought in narrow alleyways, old stone houses and dense networks of tunnels and basements. Their advance was sometimes measured in metres, and their casualties were mounting.

“We have one more battle and Mosul will be fully liberated, inshallah,” the commander said as he tucked into his meal. A captain who was still limping from a recent injury said: “Our fathers used to talk about the Iran-Iraq war as the ‘long war’. That one lasted for eight years. Well, soon this war against Isis will surpass it.”

Laughing, the commander asked the officers to open the military maps on their phones and proceeded to explain the plan for the next day’s advance. “You jump into this building, make a fire base here and here at street corners,” he said, giving them the coordinates of the street. “You advance towards this high building. Your flanks will be secured by other units. Once you take the building, you will dominate the whole area with your snipers and we can reach the river in few hours.”

Before leaving, a wiry junior officer named Taha asked the commander: “Sir, what do we do with the two detainees?” The prisoners had crossed the frontlines the night before and taken shelter with a civilian who denounced them to the army. “We tried to hand them to the intelligence service, but they refused to take them.”

“Yes,” the commander said, “they told me: ‘You deal with detainees from your end. We can’t hold them because of human rights and Red Cross inspections.’”

“We worked on them all night,” said the junior officer. “One eventually confessed that he was with Daesh [Isis], but he said he left them two months ago.” At that, everyone in the room laughed. “The other,” the junior officer continued, “we beat him hard but he didn’t confess, so I think he must be innocent.”

“Just finish them,” said a major.

“Release one and finish the other,” the commander said.

The sentence issued, now came the question of who would be bestowed with the honour of executing an Isis fighter. Kifah, a tall and lean soldier, stood next to the table and asked to be given the prisoner. But the junior officer suggested that they gift the prisoner to a captain who was still grieving the loss of his brother, killed by Isis a month ago.

“Call him and give him the detainee,” said the commander, getting up from his chair. The officers rose swiftly and stood to attention as he made his way to the living room where tea was to be served.

Facebook Twitter Pinterest Photograph: Ghaith Abdul-Ahad/The Guardian

In a neighbouring house, the two detainees were squatting in a corner, resting against the green walls of a bare room, lit by a fluorescent light that hung from the ceiling. Outside the room, soldiers in T-shirts and shorts walked back and forth, paying no attention to the two captives.

Shortly after dinner, Taha walked into the room and grabbed the head of the younger man who was to be released on the commander’s order. He had been beaten so hard that a large ball of pink flesh had replaced his right eye, and his lips were blue, thick and pouting. “Eh, you have lost your eye, who did this to you?” asked Taha, laughing.

From the circle of soldiers that had formed around the two detainees, a very skinny soldier came forward grinning. “Why? Why did you do this to this poor citizen?” Taha mocked, and the soldiers hooted in response. The young detainee stared back blankly at the soldiers with his remaining eye.

“You,” the junior officer said to the condemned man, “come with me.” When they reached the street, two soldiers bundled him into the back of a Humvee to be delivered as a gift to the grieving officer.

The junior officer lifted his chin and eyebrows, a gesture to signal that it was all over. When the Humvee had driven off, the second detainee was brought in. The soldiers pushed him into the dark street and told him to run away quickly. If he turned back, they would shoot him. The man hobbled into the darkness, dragging his broken body along, likely to be detained and tortured by another army unit.

The following morning, Taha and two officers headed to the Old City to scout the frontline before the coming battle. They walked through streets scattered with twisted cars and lorries, past half-collapsed houses and craters left by airstrikes. As they reached the end of an alleyway, they heard a woman’s drawn-out screams.

Not far off, a soldier from another unit was dragging a thin young woman by her wrist. Her shirt was torn open and her headscarf had slid down to her shoulder, revealing stringy, salt-and-pepper hair. She tried to resist as she stumbled barefoot over rocks, moaning and pleading for help, but the soldier pulled her into a bombed-out house. Two soldiers who followed him told the officers, laughing, that they knew the woman was with Daesh because they had found “five bundles” ($50,000) on her. (Mosul is a rich city, and because Iraq has no banking system, the woman could have been carrying all her family savings in cash. But after three years of Isis rule, most people in the city had sold everything in order to feed their family, and anyone who had enough money to allow them to leave had already done so. Thus, the woman was suspected of being linked to Isis.)

The officers grumbled about the lucky soldier who had stumbled across this money. “And he got a woman as well,” said one.

“But did you see how ugly she was?” answered the other, and they turned and walked on.

The battle for Mosul in maps Read more

They stopped by the Great Mosque of al-Nuri, where Isis leader Abu Bakr al-Baghdadi had addressed his followers in 2014, to snap selfies in the rubble. The medieval al-Hadba minaret, which had long been a symbol of the city, with its elegant design and familiar leaning shape, lay in heaps of 800-year-old bricks. It had been blown up by retreating Isis fighters in mid-June.

From behind the ruins, refugees were pouring out of shelled houses. They emerged dazed and scared after months of siege and bombardment. Even by the standards of Mosul, they were wretched and miserable. A soldier carrying an old woman stopped in the middle of the road to rest. She clung to his back, fearing that he might leave her in the middle of this madness. Taha went to the soldier and lent him a hand, and together they carried her to a shed where medics were trying to help other people fleeing.

They were followed by the woman’s young daughter, who held a large Qur’an in her hands, and her injured brother, who lay on a stretcher carried by two soldiers. His bones stuck out of his skinny flesh, his right leg was bandaged and he had an old scar that stretched the length of his abdomen. After depositing him in the shed, the two men left. Now other soldiers took an interest in him, grabbing him and starting to question him about his injuries.

“He was trying to get water from the river when he was shot by a sniper,” cried his sister as her brother lay in the stretcher, smiling faintly.

“This is the injury of a fighter,” said one soldier. “Take him to where his brothers are.” Two men helped the injured man to his feet and walked him across the street into an empty shop, where he was shot.

The women screamed, begged and wailed, but the soldiers ignored them. “You are Daesh,” one soldier said. “All of you in the Old City are Daesh.”

One of the factors that had aided Isis’s takeover of Mosul was the conduct of the Iraqi army and security forces stationed in the city, who behaved like sectarian occupation forces, mistreating and detaining the population at will. In the early stages of the battle for Mosul, the Iraqi army and police, keen to change their prevailing image, had taken care to preserve the lives of civilians. Soldiers and officers used their vehicles to help people evacuate their homes, and offered water and medical help. But the Old City was seen as the last refuge of Isis, and almost every inhabitant was treated as a suspect. Fighting-age men from other parts of the city, and those with injuries, were detained on the spot. The rest were sent to detention centres, where their identity would be checked.

On the way back from the Old City, the officers went into the basement of an old stone house, where a couple of soldiers lay on filthy mattresses, recording military coordinates of the different battalions taking part in the next day’s offensive. The filth in the house matched the ruins of the streets outside. Flies swarmed over discarded food packets, and dozens of empty plastic bottles lay amid piles of women’s clothing and other domestic items.

Then, on the radio, between batches of numbers, came the words: “We caught a Daesh.”

Taha grabbed a radio and said: “Bring him to me.”

A wave of excitement ran through the room. Taha made a pistol gesture and shot in the air. “We will have a party today.”

Half an hour later, a soldier brought an old man into the room and pushed him to the floor. The man looked emaciated, but underneath his threadbare T-shirt, his muscles were tense and lean. His silky grey hair and wavy, shaggy beard, and the thick circles around his large, dark eyes, gave him the look of a 19th-century Russian revolutionary. The soldier said he was spotted crossing over from Isis lines with the civilians, but when he saw the soldiers he tried flee back to Isis territory.

“Who are you?” asked Taha in a firm voice.

“I am a hospital medic, please check my card.”

“Where is your national ID card?” asked Taha.

“It was taken by Isis fighters to prevent us from leaving,” replied the man.

“Taken by Isis, or you destroyed it to hide your name? How do we know you are not an Isis commander?” asked Taha.

“I am a medic sir, I told you. Daesh forced me to go to the old city and work in their field hospital. I was there treating injured civilians and yes, I will be straight with you, I did treat some of their fighters, too, because they forced me to. But I am not Daesh, sir, I actually hate them.”

“You are a liar,” said Taha.

“I swear by Imam Abbas … ” the man began, but before he had finished his oath upon the name of one of Shia Islam’s most revered figures, Taha smacked him hard in the face, sending him tumbling back into the lap of a soldier who sat behind him.

“Don’t utter these names, you filthy animal.”

The medic picked himself up, with an insulted look on his face. “But I am an old man,” he said softly, gradually bringing back the smile to his face. If there had been a moment in which he could have saved himself, it had now passed.

Taha and the soldiers dragged the old man out of the basement and into the street. They found a deserted house attached to a large ancient church, and pushed the captive through a courtyard, up a few steps, and into a small, dark room with three tall arched windows that overlooked a cemetery. They sat him on the floor and he leaned against the base of one of the windows, his head backlit by shafts of the afternoon sunlight. They stood encircling him. “Yalla old man, why don’t you confess so we can send you away from here?” said one young officer.

The old man, still smiling, said: “But how can I confess something I haven’t done? How can I prejudice myself?”

The battle for Mosul: a dirty war in Isis's heartland – video Read more

A heavy-set soldier picked up a short, thick metal pipe and started prodding the old man’s knees with it. “Look, from the window, that rotten body over there,” he said. “That was one of your people. We captured him few days ago and he, too, refused to confess.”

The man craned his neck and looked out of the window behind him. Below the house, a bloated, decomposed body had turned black under the scorching summer sun. He turned and smiled, but there was now a hint of fear, a loss of control. “I am just a medic,” he mumbled. Taha swung his leg back and kicked the man’s face so hard that he collapsed motionless on his back. For a second, everyone in the room thought he was dead.

“Pour water on him, he is faking,” Taha said angrily.

One soldier pulled the man up and sat him down again. Slowly, he opened his eyes, which at first looked stunned, and then darkened with anger. He opened his mouth, and a dark lump of flesh, blood and a set of large, gleaming false teeth tumbled on to his chest and the floor.

“Ha, will you confess?” said the soldier with the metal pipe.

“I have nothing to say,” hissed the man with blood pouring from his mouth. Taha nodded to the heavyset soldier, who pulled the old man to his feet, his legs wobbling. He leaned the man against the arched window and then, in one quick move, the soldier flipped him out of the window, but held his feet. The old man hung, swinging, from the window.

“Are you going to confess now?” asked the soldier. “What else is left for you?”

“How can I prejudice myself?” came the faint voice of the old man from below.

In that dark room, the soldiers and officers looked at the old man’s feet, dirty and cracked, for a few seconds before they vanished from the window. He fell into the yard below with a thud. The soldier who had dropped him leaned out of the window with his machine gun and fired five bullets into the body in the rubble below. A cloud of gunpowder filled the room, dancing in the shafts of light. The soldier looked out of the window and then fired two more bullets. “These two at his legs, just in case he wants to walk home,” said the soldier, laughing.

Taha and the two officers walked back. A young officer said, with a sheepish smile: “I wonder if God one day will punish us for all these killings. Will we go mad or something worse?”

“He is my fifth since the start of [the battle of] Mosul,” said Taha. “Al-Qaida have one good principle: if they suspect someone, or have the tiniest evidence against him, they execute him. They say that if he was guilty, he deserved it, and if he was innocent, his blood will be purged and later he will go to heaven. I follow the same principle.”

The following morning, before dawn, in rooms lit by flickering generator light, two dozen soldiers in boxer shorts and T-shirts were preparing for battle. They had slept on the front line, ready to attack at first light. Before they put on their uniforms and weapons for the last push, these lean young men looked harmless, even vulnerable. Like a large, dysfunctional family preparing for a picnic, the soldiers bickered and jostled. Someone shouted for his night-vision goggles. Another looked for the box of smoke grenades. Eventually the goggles were found, but without batteries. The other soldiers stuffed hand grenades and water bottles into their packs, strapped ammunition magazines on to their flak jackets, and tried to eat stale cheese sandwiches.

Finally the soldiers formed a long line and moved into the ruined, haunted alleyways of old Mosul. As they made their way through concrete rubble, their metal ammunition boxes and magazines rattled in the darkness, announcing their arrival like goat bells on a mountainside. Bodies lay everywhere, scattered like breadcrumbs leading to the frontline. With the sun rising, the stench of the dead rose above the ruins, bringing with it swarms of flies. One young officer threw up. The soldiers stood watching him dispassionately. They were silent. Their chirpiness had deserted them, replaced by a foreboding gloom. They yearned for the reassuring sounds of bullets and explosions, and feared the silence before battle.

“If someone is injured today, they will probably die before they reach the back lines,” said one veteran soldier.

“Why are they pushing us so fast before even securing a supply line?” said another soldier.

“So that the commanders can reach the river quickly and take selfies,” someone answered.

At 5am, the soldiers climbed over the rickety skeleton of a metal bed and into a tall building that was once home to medical clinics and labs. Today the building was just a gutted frame, its floors piled with medical records, x-rays, medicine boxes and decomposing bodies. A sign on a wall instructed female doctors, by the authority of Isis’s moral police, the Hissba, to always wear the niqab, even when they were examining female patients.

Facebook Twitter Pinterest Photograph: Ghaith Abdul-Ahad/The Guardian

When the order for the attack came, a column of men, each holding the shoulder of the man in front, moved quietly to the front of the building and stood behind a twisted shutter. The early morning sun filtered through a thousand bullet holes, washing the soldiers’ faces with a bright orange glow.

The first column ran across the street, climbed a mound of debris in the middle and reached the opposite corner. A second column followed, one by one. The first crossed, the second followed, then the third. Smack, came a sniper’s bullet. The third soldier fell, and the fourth ran to pull him back. Smack, came the second sniper bullet, and hit the helper’s leg. He crawled back and the offensive came to a halt.

The officers in the building called for an American airstrike on the sniper’s position. It came five minutes later, but when it was over, the sound of the sniper’s shots resumed outside. Trying to guess the sniper’s position, the officers called for a second airstrike, closer to the building they occupied. Soldiers and officers took cover in the corridors. When it came, the building shook violently and the air filled with a thick cloud of dark grey dust. Smoke grenades were thrown, and the cloud turned orange and yellow as the dead soldier was brought in, carried between four men, the first casualty of the day. When the dust settled outside, the sniper was still there.

Two dozen soldiers, who had managed to slip past the sniper and cross the street, split into three groups. One headed right, towards a large church complex, one headed left to take over a multi-storey building, and in the middle, Taha and four other soldiers moved forward. They were led by a square-shouldered old man with a bushy moustache, a member of a group of local vigilantes helping the army, motivated by revenge for relatives killed by Isis. The old man walked confidently, straight-backed, making his way through the destruction as if he were walking in his garden. Moving along the walls in a crouch, the soldiers followed at a distance. They came to a construction site with a rotunda of columns.

Taha and his soldiers debated where their target was. The aerial maps they carried on their phones bore little resemblance to the topography of destruction around them. The old man pointed at a pile of debris and said that was where he used to live. Hearing the sounds, Isis fighters hiding behind the mound opened fire. Two soldiers crawled to the edge, lifted their guns and sprayed bullets into the street below. A third sent a hand grenade arcing into the sky. After a few seconds of silence, a fountain of debris sprouted from where the grenade fell.

The shooting didn’t stop. In between shots, the soldiers could hear Isis fighters calling each other.

“Silence,” hissed the junior officer. The soldiers stood and listened. From somewhere right behind the mound, they heard, “Abu Yussuf, Abu Yussuf, where are you?” It was a young Isis fighter, sounding panicked.

The old man walked to the edge of the building and shouted: “My brother, my brother, where are you?” He pointed to a window, and told the soldiers: “He is there.”

“Give me a grenade,” said a soldier.

They gave him a homemade C4 bomb to preserve their supply of hand grenades. The soldier crouched and bowled it over, and a huge explosion followed. Bullets cracked overhead. The voice came back from behind the mound, more urgent, calling for help.

“Go back and talk to him,” the junior officer told the old man.

“My brother, my brother, who is here?” shouted the old man. “Brother” was the callsign among jihadi fighters.

“It is me, brother. Come help me,” a faint voice replied. “I am stuck here.”

“Are you alone?” asked the old man.

“Yes, yes brother, I am alone, just come,” answered the voice.

“He is hiding across from us, behind a door. He may be trapped,” said the civilian. The soldier threw another bomb.

A cat-and-mouse game followed. After each explosion, the civilian called, the “brother” answered, and the soldier lobbed a bomb.

The commander came through on the radio and asked for progress. “We are dealing with a trapped fighter, sir,” the junior officer answered.

“Well, you have been dealing with him for an hour now. Make a move,” shouted the commander.

The “brother”, perhaps growing tired of the game, fired a few more bullets and went silent.

“Maybe he is dead,” the old man said.

“Or maybe he is faking death and wearing a suicide vest,” said the junior officer. Finally, they sent the old man with two soldiers to check.

“Be careful, one step at a time,” said the junior officer. They descended the mound, opened a metal door and found no one, either dead or trapped.

“Don’t cluster here, we will be picked off,” said the junior officer. “Head to that house,” he said, pointing up the street. The men started climbing another mound of debris, slipping on pots, tiles and bits of furniture. They pushed open the front door slowly. In the entrance of the house stood a small blue plastic barrel filled with murky, acrid water. A dark film floated on the top. In the July heat, they had finished whatever water they had on them, and were parched. They hesitated at first, but gradually relented, clambered around the barrel, scooped up water and started drinking.

“Don’t drink that,” said the guide. “This is filthy water. Just wet your lips, otherwise you will get diarrhoea.” Ignoring him, the soldiers splashed their faces and drank.

The house was small: two rooms around a courtyard. One room had collapsed, and in the other the junior officer, soldiers and their guide sank down, exhausted. Outside the house, there was a racket of explosions, machine-gun fire and the whoosh of airstrikes. At least five battles were raging on the same block, and they didn’t know who was firing where.

“Go down and check that the basement is clear,” the junior officer said. Two exhausted soldiers dragged themselves to the rickety stairs.

“Sir,” the junior officer said into the radio. “Sir, are we getting any support? We are only five here, and we are waiting for other units to advance.”

“Hold your ground. Support is on its way,” answered the commander.

“And water sir, the men are parched.”

From downstairs came the clanging of furniture and pots. The courtyard was clear. The two soldiers moved towards a door leading to the basement. “Be careful,” shouted civilians from the floor above. “There are families still hiding in this area.”

The basement door squealed as they pushed it open slowly.

“If they die,” joked a soldier from the floor above, “they will be martyrs in Allah’s eyes.”

Silence, followed by a burst of gunfire. A second burst echoed loudly in the small courtyard. The two soldiers ran back up the stairs, one with his face covered in blood, clutching his injured arm and dragging his gun. “Tie it, tie it,” he pleaded, as he lay with the bleeding arm in his lap.

'We have no home to go back to': citizens of Mosul return to ruin – in pictures Read more

“There is no one in the basement – they fired at us from an opening in the wall leading to the alleyway. They are in the alleyway,” said the second soldier as he tied a tourniquet around the injured arm. Their position exposed, bullets started raining over the courtyard from multiple directions.

“Sir we have one injured man and we are besieged here,” said the junior officer on the radio.

“Give me the enemy coordinates.”

“Where are they?” the junior officer asked the soldier, who shrugged.

“How would I know? They shot from behind the wall.”

They gave random coordinates 50 metres away and settled back to wait. A whoosh followed by an explosion shook the house. A wall fell and rocks rattled on the roof. There was nothing for the five of them to do but wait. So they kept an eye on the door, listened to the firing outside in the alleyway and tried to guess where the Isis positions were.

Half an hour later, there was still no news of reinforcements. “Boys, we can’t just sit here. We will lose all our work, let’s move,” said the junior officer. “Two of you go from that side and skirt around them, and we move to the next house.”

They divided up the hand grenades, and were preparing to move when the sounds of heavy machine-gun fire came from outside the entrance of the house. The door was pushed open, and 15 Iraqi army soldiers from another column stumbled into the room. “Disperse,” shouted their chubby officer. “And keep an eye on the door.”

It was chaos: soldiers were shouting at their officers, and officers were refusing to obey orders radioed to them by their commander. The building they had captured earlier had been set ablaze by Isis fighters as they escaped, and two of their men had burned to death inside. They did not want a repeat of that.

“Sir, I can’t advance, we are besieged. The other battalion has an injured man and they can’t even evacuate him,” shouted the officer into the radio. “You either send us help or give us permission to retreat. We can’t even evacuate the injured.”

The commanders, playing checkers on a virtual map that had nothing to do with the reality of the destruction on the ground, ordered them to advance from a different corner.

“Do you think they care about us?” said a soldier. “They are sitting at headquarters, with the air conditioning cool on their faces, drinking tea and cold water, ordering us to advance.”

Twice the officer and his men tried to find a way out of the small house, but each time they opened the door, Isis fighters opened fire, pinning them down and sending everyone clambering back into the room.

“They are trying to get us killed,” the officer said. He smacked his forehead and collapsed on the floor where men squeezed against each other, and many more stood in the doorway, unable to find a place to sit. The house was now surrounded, and by the afternoon even the acrid water in the plastic barrel was running out. Some sneaked into the courtyard looking for water, while the rest dozed in the suffocating heat. A civilian scout came back to the house, saying an Isis unit was moving down the lane. The officers positioned two machine guns at the windows and went back to their slumber. American jets sent a rocket or a bomb every 15 minutes. In the silence that followed each explosion, the only sound was the clicking of lighters as the men smoked.

Facebook Twitter Pinterest Photograph: Ghaith Abdul-Ahad/The Guardian

During a lull, when even those guarding the window were nodding off, there came the tinkling of broken glass, and the sound of something falling just outside the room.

“Get down. It’s a grenade,” shouted a soldier.

The explosion smashed the front of the room, sending in showers of glass, shrapnel and smoke. Then bullets came screeching in, smacking against the ceiling or high on the walls above the soldiers’ heads. Men piled on top of each other, trying to take cover. Shouts of “I am injured” were drowned in the chaos. The two soldiers standing in the corners fired their heavy machine guns into the courtyard. Bullets rained on the house from two other directions. Another grenade was tossed, but exploded just outside the window.

“You’re bleeding, let’s move,” said a voice. Someone crawled to the entrance and threw a smoke grenade, and under its cover the soldiers ran. Taha and his four men stayed behind, shooting bursts of machine-gun fire from the window over the courtyard.

“We have to leave. We have one box of ammunition left, and no grenades,” said one soldier.

“If we stay here, they will pick us off one after the other during the night,” urged another. “We can give the coordinates of this house to be bombed.”

Taha didn’t want to leave and lose ground that had taken him all day to capture, but his fighters were not going to hang around. They stumbled across the open area in front of the house, sliding over the debris, falling over. In a few minutes, they were back in the crowded room where they had started their day.

The soldiers collapsed, exhausted, thirsty and tired. There was no water, no food and no way to evacuate the injured, who sat in the shade, losing blood and moaning. In spite of half a dozen airstrikes, the sniper still controlled the street, cutting off the only supply route. Soldiers on the other side of the street stood on high balconies and tossed plastic bottles of water across to them. Most of the bottles broke, spilling the precious liquid on the rubble, or fell into no man’s land. The bottles that survived were quickly snatched and drunk by the soldiers in charge of collecting them for their exhausted comrades. A rope was tied across the street and two plastic bags filled with water bottles were hung on it; they slid down slowly, but before they reached the soldiers, the sniper fired and cut the rope.

“This is all the chaos of the commander pushing us quickly without a supply line,” one soldier said.

Indifferent to all of this, the commander was shouting orders over the radio, demanding that the men advance again. “Who gave you orders to withdraw?” he demanded.

“Sir, I have four injured,” came the reply.

The generals called for more airstrikes. Each time they heard the call to take cover, the men cowered and waited before a huge explosion rocked the buildings, and clouds of dust, concrete and smoke blew down the street. Each airstrike churned earth and concrete upside down, creating a broken landscape more difficult to negotiate.

The sector had been carved up between a dozen battalions from at least three different police forces and the army. The idea was to instigate a race between the different commanders. The generals would push the commanders forward, telling them that others had advanced. While they had their virtual race on iPads, played by coordinates on a landscape they couldn’t see, it was left for the soldiers to advance or not.

At 5pm, the generals demanded a fourth attack. Taha called on the men to gear up and start moving.

“Water, water – we are dying of thirst,” the soldiers shouted back. They refused to move. The junior officer alternately pleaded and threatened, until finally they relented and shuffled forward, grumbling and cursing. They were halfway to the house when they learned that a young, ginger-haired new recruit who had volunteered to stay behind and collect water had been killed by the sniper. On hearing this, the men simply turned around and walked back, abandoning the attack and refusing to obey orders.

In the rubble-strewn alleyway, they sat on boulders, or piled up metal sheets to make beds, and asked anyone passing for water. The dead soldier lay under a sheet, his feet sticking out. Two soldiers sat next to his body and wept in silence, their shoulders shaking. A few metres away lay the rotting corpse of a dead Isis fighter.

After midnight, three soldiers crawled on their bellies out of the darkness from across the street. Braving the sniper fire, each carried sacks containing bottles of water and boxes of ammunition. They emptied their load and headed back with the body of the young soldier. The soldiers stayed where they were, to continue fighting the next day.

Four days later, Taha and a Cpt Wissam sat on piles of red, blue and pink underwear in a burned-out storeroom, contemplating their fate. They knew that the commander was under pressure from his commanders, who were under pressure from the generals in Baghdad, who were under pressure from the prime minister, who had been in Mosul since yesterday, waiting to declare victory, and was himself pressured by the Americans to finish the battle, or else they would stop air support. The whole pyramid of pressure was weighing on these few men in a room full of coloured bras and burned bottles of shampoo.

Since the first day of the offensive, days ago, they had been manoeuvring between bombed-out buildings and heaps of rubble, trying to advance, but had come up against fierce Isis resistance at every corner. When they had managed to advance, they only gained a few metres. On average, four suicide bombers charged at them each day. One even came running on crutches. At night, they ate and slept in burned and destroyed houses, next to the rotting bodies of fighters and civilians, sometimes separated from the jihadis by a single wall. Swarms of flies crossed between them, feasting on the scattered dead.

Iraq’s lost generation: ‘I have forgotten what happiness is’ Read more

“I just want to see my daughter now,” the junior officer said. “Will I ever see her again?”

“It’s fine,” laughed the captain. “In a few hours it will be just another anecdote.”

They stood, collected their men and crept outside, skirting around the bodies. Other units had pushed ahead, parallel to their progress, and their sniper had killed a handful of Isis fighters, who lay in the alleyway outside. They started shooting at a corner building ahead, but before they reached it, an explosion went off. One of the men inside had blown himself up. The soldiers found six fighters on stretchers, frozen into blackened charcoal in their moment of agonising death.

The soldiers took shelter in a small shop, fired, and moved down an alley into a building, where they killed two more Isis fighters. They climbed the wreckage of the building and emerged on to the roof. They looked out at the vista of destruction. They had reached the blue River Tigris. Mosul was liberated.

On 9 July, as the defeat of Isis was declared in Mosul, the prime minister, dressed in military fatigues, stood flanked by rotund generals in crisp uniforms, and gave the long-awaited victory speech. “Mosul is liberated,” he declared from a platform inside the military base on the outskirts of the city. A week of celebrations was called and, all over Iraq, banners and flags were raised in jubilation.

In the afternoon, the commander and other unit leaders headed to the riverbank in a big convoy of armoured Humvees. They inspected the ruins where their men had fought, walked to the riverbank and stood snapping selfies. Each officer gave his own victory speech to the accompanying TV cameras. Not far from where they stood, a lone Isis sniper hiding in a collapsed building was firing desperately at a platoon of the federal police, the bullets hitting their armoured vehicle with a loud twang. A US jet fighter descended, a rocket screeched and an explosion followed. A white plume of smoke rose into the sky and then turned dark. Dust and debris swept over the skeleton of the bridge.

In the commander’s house, officers smoked, exchanged congratulations and thrillingly recounted the crucial moments of the battle, expanding and embellishing their own role with each retelling. Their soldiers were allowed to go back to their base to rest and shower after a week of sleeping next to decomposed bodies, which had given them strange skin diseases.

Pockets of Isis fighters continued to resist for another week, but gradually the fighting died down, and a day came in Mosul when, for the first time in many years, machine-guns, car bombs and jet fighters went silent. Then the orgy of killing started.

Night after night, in ruined houses, makeshift cells and the dark streets of Mosul, those identified as members of Isis were tortured and executed. Jubilant Iraqi soldiers filmed themselves beating and shooting prisoners.

Locals, keen to exact revenge on those they held responsible for the miseries and destruction of the last three years, started denouncing not only members of Isis and their families who had tried to blend in with fleeing civilians, but also any man of fighting age who came from a different city, bore the marks of injury, or simply looked suspicious.

Facebook Twitter Pinterest Civilians fleeing the fighting in Mosul. Photograph: Ghaith Abdul-Ahad/The Guardian

Men came to the commander’s house every night with denunciations. Some were absurd: a frail man in tattered brown trousers and a white shirt came running to report a family of refugees because their three young sons never left the house. A doctor reported the brother of someone who ran a Facebook page sympathetic to Isis. A man who sold vegetables and used to call for prayers in the local mosque was dragged in by local vigilantes, but after a couple of hours of torture he was pronounced innocent, and released.

Two or three nights later, when the commander was perched on a sofa in the requisitioned civilian house they were using, playing with his phone, a group of civilians entered the room, pushing a man in front of them. They forced him to kneel, his hands tied in front of him with a piece of cloth ripped from his colourless shirt. The locals sat around him, shouting that he was a former Isis executioner.

“Remember when you stood in the middle of that roundabout and killed three men?” said one.

“He’s been working with jihadis since 2005,” said another.

The man looked up, confused, and mumbled that it was his brother who had joined Isis, not him.

The commander handed the man’s ID card to a soldier to be burned, to disappear him from official records, and nodded. Kifah, the lean soldier, joyfully dragged the man out into the street. Other soldiers and officers followed, and locals cheered and celebrated. Kifah pushed the man ahead of him, while others kicked and punched the man to the ground, jeering and taunting him, dragged him up and kicked him again, laughing when he fell.

“Sing one of the caliphate songs for us,” Cpt Wissam said, laughing hysterically, his eyes blazing with rage. They made their prisoner run in front of them, telling him he was free to go. He ran, stumbling as he tried to pull his falling trousers up with his hands tied. They chased him, kicking and slapping. A soldier jumped in the air, and kicked him in the face with the theatrical relish of a professional kickboxer. He was dragged through an open drain, pulled into a dark side street and forced to kneel.

The man stared blankly at the pile of rubbish in front of him, the powerful headlights of a truck lighting the scene. Behind him stood Kifah, stretching out an arm with an American pistol at the end of it. Another soldier stood behind him, filming on his mobile phone. “This is to revenge all the martyrs killed by Daesh,” said Kifah. A single shot rang out, echoing in the deserted street. Blood squirted from the man’s head and he fell on his side. Kifah flipped him on his back with his feet, looked at him and walked away.

“Maybe we should check he’s really dead,” said the soldier who was filming.

“If he survived that bullet then he deserves to live,” said Kifah.

Back in their room, the soldiers watched the video many times, lying on mattresses between machine guns, backpacks and boots. “I filmed this for an uncle of mine who wanted to come here just to execute a Daesh,” said Kifah.

The soldiers were killing for different reasons: because they had no trust in the judicial service, believing that detainees would be able to buy their way out, as they always had; in revenge for the atrocities committed by Isis; and because the chaos made it possible for them to cleanse the city of Isis fighters.

“Soon the city will be divided into military sectors, and we won’t be able to drive around town without notifying the central command,” Kifah explained. “Now it’s chaos, and in the chaos we can work well.”

Kifah – tall and handsome, with delicate features and long eyelashes – was in his late 20s, and had been fighting for a decade. He was stationed in Mosul when the city fell on 10 June 2014, and he saw the humiliation and rout of tens of thousands of Iraqi soldiers. He left the city on one of the very few Humvees withdrawing under military command. On the road they saw local people throwing stones at retreating soldiers, and came under ambush. They saw dead soldiers lying by the side of the road.

They reached the Camp Speicher airbase, 170km north of Baghdad, that night. “The next morning,” Kifah recalled, “a general came to the base and ordered us to organise an attack to clear the neighbouring villages, but the men ignored him. We knew the area had fallen, and our battalion said: ‘We won’t go.’ The general then ordered one unit to close the gates. Other units said: ‘General? What general?’ And different units clashed with each other.”

Morale had collapsed. Relatives were calling the soldiers on their mobile phones urging them to desert. Towns and villages in the Sunni heartland were imploding even before Isis forces arrived.

Facebook Twitter Pinterest Iraqi soldiers and federal police resting and washing in the Old City of Mosul few days after the end of the fighting. Photograph: Ghaith Abdul-Ahad/The Guardian

Kifah left the base in a convoy of three trucks. When he reached home, he deserted, like so many others. He sat in his family home and watched Isis propaganda footage on TV, showing how thousands of young cadets from the army and airforce, who had remained at the camp and had been promised safe passage out, were herded into lorries and pick-up trucks like cattle. They were filmed denouncing the prime minister and the Shia clergy, and begging for their lives. They were marched to river banks or fields, and made to kneel, or lie on their stomachs in rows. A man carrying a Kalashnikov rifle, his head covered, walked along the rows, firing a single bullet in the back of each head. The official count said 1,700 men were killed on 12 June 2014, although Kifah and others say the number is higher.

Those who died are considered martyrs now, but Kifah blames them: the men left a base piled with weapons, they let themselves be captured, when they could have fought back.

The massacre at Camp Speicher was a catalyst for all the rage that came after. Its trauma sat high on the pedestal of Shia grievances. A “never-again” culture emerged, mobilising men on the streets. It set the barometer of brutality of this war. This was different from the sectarian civil war of few years earlier, when Kifah protected his Sunni neighbour against threats from Shia militias, and the neighbour reciprocated by getting Kifah’s family out of trouble at a jihadi checkpoint. Previously, a medic, a journalist or other non-combatant would have been exempted the harshest treatment, but in this brutal war, whose rules were laid out by the jihadis, no one expected or gave clemency.

After the massacre, Kifah had sat in the house, until one day his father, a university teacher, told him he was going to the front. “We are two men in this house,” he said, “one of us has to fight.” Kifah rejoined his unit and started the long, slow March to Mosul.

In the days after victory had been declared, Iraqi soldiers who captured suspects would often give their victims water, tea, and sometimes even food, in order to revive them enough to continue the torture.

One day, a group of the commander’s men brought a man called Omar to their house for interrogation. He had been denounced by two women at a market where he had been trying to buy food. The soldiers went through his wallet, looking for ID. “I lost my ID card. Isis killed my family,” he told them. They opened his phone and logged into his Facebook account, where they found messages from jihadi sympathisers.

The soldiers made him lie on his stomach and raise his legs; soldiers fashioned whips from electrical cables and metal wires, and beat his feet. When he lowered his legs, a soldier squeezed his head with his boots until he raised his feet again. Between his cries of pain, he insisted that he had nothing to do with Isis. After repeated punches, he fell and blood poured from his head. “Ah fuck, now the smell will be horrible,” said one soldier. “Who’s going to clean this up?”

They woke him up and gave him half an hour of respite. For five hours, soldiers and officers tortured him in shifts, taking turns. After each shift, Omar was made to stand up jump on the spot, so that his feet wouldn’t go numb and he could still feel pain. When his body had turned crimson, with deep gashes, two more soldiers joined and started all over again.

“Lets try and see which one can hurt him more,” one said. When the pain was unbearable, Omar gave them the hiding place of one of his fellow fugitives, Ammar.

Ammar was asleep between the graves in a cemetery when the soldiers surrounded him, flashing lights on his face, pointing gun barrels at his head. He jumped like a scared mouse. He was brought to the officers, and before they had struck a single blow, he told them that he had been a member of Isis and had fled the Old City, and that Omar was an Isis fighter.

Three years earlier, when Isis captured Mosul and swept through the Sunni heartland, Ammar was just 14, preparing for his end-of-year school exams. His brother, who had joined Isis a few years earlier, told him that the years of oppression by the Shia government in Baghdad and its sectarian security forces were over. Ammar followed his brother’s lead and enrolled in one of Isis’s military training camps. After a few years, the brothers joined the privileged members of the new regime in receiving monthly stipends and perks. They became believers in the eternal and expanding victory of the caliphate.

Facebook Twitter Pinterest Photograph: Ghaith Abdul-Ahad/The Guardian

In the summer of 2016, as the Iraqi army started its march towards Mosul, liberating villages and towns along the way, Ammar’s brother was killed. Ammar, his sisters and mother fled towards Mosul, moving from one neighbourhood to the other until they found themselves besieged in the Old City. His mother and sisters had escaped into liberated, government-controlled areas, but Ammar was held back by his commanders, who shot dead an Isis soldier who attempted to desert. As the Isis defences crumbled, Ammar managed to slip through the frontlines, along with columns of desperate civilians. Desperate, scared and hungry, he had roamed the wartorn city for days, until he came across a group of other fugitives, which had included Omar.

Ammar’s confession to the commander’s soldiers did not save him from torture, but it hastened the death of Omar. The two men passed each other as Ammar was taken to the torture room and Omar was dragged out into the street and shot.

The heritage of torture in Iraq evolved in a linear path from Saddam’s intelligence agency, the Mukhabarat, to the Americans in Abu Ghraib, and thence to the sectarian forces of the Iraqi government and its militias. Now, in the nightmare of Mosul, torture served no investigative purpose. It achieved and demanded nothing beyond an imperative to exact pain and revenge.

“I don’t want to hear his confession,” one officer said. “What will I do with it? I want him to suffer and die.”

For the lucky ones, death was swift. For Ammar, death was a luxury he had to wait for.

The officers did not see their victims as humans, let alone as fellow Iraqis: they were simply the enemy. They needed to hear the Isis soldiers who had been their tormentors begging for mercy, before they could celebrate their final victory. They needed to hear the Isis soldiers’ animal squeals of pain, in order to feel they had avenged the loss of their families. Perhaps Isis’s victory lies in its conversion of the Iraqi people to its own methods.

By midnight, the soldiers were tired with Ammar; black lumps had swollen over what used to be his face. He was taken to where his friend had been lying dead for couple of hours. There is nothing noble about death in Mosul: dogs had already taken parts of Omar’s leg. Ammar was ordered to kneel by the dead body. A soldier moved him to a better position to film. He did not resist. He was dead before the bullets entered his skull.

It has been a long time since the commander and his men started fighting. Before Isis, they fought Sunni insurgents and Shia militias, and before that, they spent their formative years in the shadow of a sectarian civil war – they had seen their relatives killed, car bombs, kidnappings, dead bodies in the streets. A decade and a half of harrowing war had become an integral part of their existence, not just as soldiers, but also as the unfortunate citizens of the country of Iraq. They are the children of the occupation, locked in an endless cycle of the violence it created.

In the war against Isis, they found a cause, the camaraderie of a close-knit tribe, and something akin to patriotism. They saw themselves as the defenders of the nation, warriors of a just and pure cause against an absolute evil. The cause allowed them to feel they were above the state – they did not answer to a gang of corrupt politicians in Baghdad. They have stared death in the eye many times, and that gave them the right to decide what is right and wrong.

“Sometimes we do things and we know we are breaking the law,” the commander told me one afternoon as he sat sipping his tea. He lit a cigarette and continued: “My general tells me: ‘Don’t bring me any prisoners – if you know they are Daesh, then deal with them from your end.’ My soldiers call me and say: ‘We have found a man’, and I tell them: ‘Kill him.’ I ask myself sometimes: what am I doing? Who am I to end the life of a man? I tried to consult a cleric who fights with the security forces. He said that if the prisoner was not armed, it is better to be cautious and hand him over to the state. But then who are those who are going to pass judgment on him? What qualities does the judge have that I don’t? And who appointed the judge? You’ll tell me it was the state – but who gave the state the right to rule over people? It wasn’t given by God, so I have the right to end the life of a man as much as the state has. But then, we are openly breaking the law, and if they catch me I will be strung up.” When he finished, the cigarette in his hand had burned away, and he lit another.

After the liberation of Mosul, when the military started counting the cost of this war, the ecstasy of battle wore off, to be replaced by bitterness, resentment and the feeling that their victory was hollow.

Like many other frontline units, the commander’s battalion had suffered heavy losses. Many of his veteran officers had been killed, and those who replaced them were killed, too. Those who survived carried the scars of major injuries, and the mental scars of a decade of war.

Facebook Twitter Pinterest Photograph: Ghaith Abdul-Ahad/The Guardian

Around them in Mosul, captured Isis weapons were siphoned off by soldiers and corrupt officers, and then sold to the Kurds or one of the dozens of Shia military units that were ostensibly established to fight Isis. These militias have been stockpiling Isis weapons in preparation for the next conflict. In Baghdad, the very politicians whose disastrous actions had led to the rise of Isis were appearing on TV, giving speeches, as they continued to jostle, bicker and loot the nation.

The commander and his men knew that the silence of guns in this ruined country did not mean peace; it simply meant the end of one kind of war and the start of another. Like those trapped in a long, destructive relationship, they were tired of this war, but feared its end much more.

Isis: the inside story | Martin Chulov Read more

“What I dread most,” Taha said, “is going back to the days of sectarianism, when we didn’t know who was our enemy and who was our friend.”

“I wonder what will we have after Daesh?” asked another officer.

“It will be the militias,” answered Cpt Wissam, with his hoarse, sarcastic laugh. “We will finish with Daesh and they will send us down to the south. Why do you think the Hashed [Shia paramilitaries] are hoarding all these weapons and money?”

“I am afraid we will be coming back to Mosul to fight again in few months,” said the commander, without looking up from his phone. “There were 40,000 Daesh fighters in Mosul. Have we killed 40,000? No. Then where are they?”

“After Mosul, we should drive to Baghdad and do to the Green Zone what we did to Daesh,” Taha said. “Only then will Iraq have peace.”

The names in this article have been changed

• Follow the Long Read on Twitter at @gdnlongread, or sign up to the long read weekly email here.