I. Eastern Mosul

In a film, on the news, you watch a war. While in a war, you mostly hear it. Weapons are fired day and night, but only sometimes do you see them fired. As much as images, then, each battle takes on its own sounds.

The battle of Mosul began officially on Oct. 17, 2016. Sonically, it didn’t come into its own until some weeks later. In the opening skirmishes, as Iraqi troops encountered Islamic State fighters on farmland and in villages outside the city, rounds whistled unobstructed through the air and thudded in the sod, a vague overture. When the troops breached the easternmost districts of the city proper — in early November — then you could begin to really listen to the conflict.

On an evening later that month, I was embedded with a company of Iraqi Special Operations Forces in a neighborhood near Mosul’s eastern edge from which they had expelled the jihadists. The troops had set up a temporary command post and barracks in a group of commandeered homes surrounding a plaza that included a mosque and a park, or what had been a park — now it was a mud patch where Humvees, armored bulldozers and a fuel tanker were parked. Most of the modest rowhouses in this neighborhood — Zahra, a middle-­class enclave of shopkeepers and pharmacists and taxi drivers — had made it out of the fighting intact; others were crumpled but salvageable; others were mere rubble. The sunset was threaded through with black smoke from the car fires ISIS had lit to try to obscure its positions from aerial surveillance. The futility of this tactic could be heard and felt every few minutes, as a jet dove in to drop a bomb, or a heavy artillery shell found its target, with an atmosphere-­consuming shriek and a thunderous, belly-­seizing impact. And yet ISIS set the cars ablaze every day.

Zahra

WESTERN MOSUL

Old City

EASTERN MOSUL

Tigris River

2 miles

Map of Mosul's Zahraa neighborhood. Credit

After dark, a polyphony of firefights broke out around our position. The reliable chatter of rifles, the more insistent clangor of machine guns, the congested peals of rocket-­propelled grenades went back and forth. The airstrikes and artillery continued. At midnight, I climbed to a roof, ducked below the parapet — ISIS snipers had night-­vision equipment, it was believed, though they were good enough not to need it — and peered over. Mosul is situated in a riverine basin, so that a high enough spot can give you a view over the city’s ancient marble walls, the domes and minarets of its medieval mosques, the balconies of its cinder block apartment houses. The car fires had created around the city a necklace of Boschian throbbing orange-­red.

A sinister chorale crept into the gunfire — ISIS fighters baying from mosque loudspeakers. “Allahu akbar! Allahu akbar!” Others shouted the phrase in the streets. From more loudspeakers came an ISIS anthem. I asked a soldier how the same song could come from different places in unison. He pulled from his fatigues a pocket radio and tuned it to 92.5 FM.

“ISIS’s radio station,” he said.

At the time, Zahra and a few areas around it represented a minute but expanding peninsula of military occupation jutting into the city, whose 251 neighborhoods were otherwise entirely controlled by ISIS. The plan was to push the jihadists west toward the Tigris River, which bisects Mosul, then encircle them on the west side. No one knew how many fighters were waiting. Some soldiers estimated a thousand, some five times that. Some believed that the battle would take two months, others a year. However many fighters there were, ISIS knew they were not enough to face off in the streets with the Iraqi forces pouring into Mosul: roughly 10,000 troops, with an additional 90,000 militiamen, police officers and Kurdish soldiers massed on the city’s perimeter. Flying above Mosul were the jets, bombers, helicopters and unmanned aerial vehicles of an American-­led international coalition, and around it was a constellation of heavy artillery firebases.

Civilians walking down a destroyed street in Mosul. Credit Gabriel Chaim for The New York Times

So ISIS, in its efforts to hold Mosul — or, really, to kill as many people and destroy as much of the city as it could while losing it, as the jihadists knew they inevitably must — relied on tactics known in Western military parlance as “harassing fire.” It was a phrase that amused Iraqi soldiers whose English was sufficient to understand its insufficiency and who had to actually endure this harassment. ISIS’s harassers included world-class snipers, crack mortar teams, the suicidal drivers of vehicle-­borne improvised explosive devices, or V.B.I.E.D.s — mobile car bombs — and, to direct these efforts, something new to warfare, a fleet of commercial-­market drones. ISIS managed to smuggle untold numbers of the small, cheap machines, the kind of thing you can buy on Amazon, into Mosul.

On his phone, a sergeant major showed me a video taken by one of the enemy drones, which the jihadists used to target strikes as well as record them. When a strike was successful, they would quickly edit the video and put it online, part of the steady diet of near-real-time footage that each side supplied the internet. The troops watched ISIS’s videos as avidly as everyone else — another of this battle’s weird techno-­wrinkles. This particular clip, uploaded a few days earlier, showed a car bomber speeding up a street not far from where we were now, toward a group of parked Humvees. “Those are ours,” said the sergeant major, Karim. The car bomber slammed into a Humvee. A ghostly gray expanded in the middle of the screen. “I was injured,” Karim said, lifting up his shirt to reveal a scar. “No, wait. This is from something else.”

It was hard to keep track. The Iraqi special forces had been fighting ISIS for more than two years. They had fought them near Baghdad, in Ramadi, then Falluja, Tikrit and Baiji, pushing the jihadists north nearly 250 miles to Mosul, the caliphate’s greatest urban stronghold. Many of Karim’s comrades had fought Al Qaeda and ISIS’s other precursors before that. The tip of the spear into Mosul, the special forces had been going without a break for weeks now, taking heavy casualties. Karim had been wounded five times since Ramadi. In Falluja, a rocket skivered a Humvee in which he was the gunner. It was the scar from that attack that he wanted to show me, a discolored sunken patch below his rib cage. Looking down at it, he said, “It was a big hole before.”

I began traveling to northern Iraq last summer as the battle of Mosul loomed, to meet the people making it out of the city and those preparing to go in. When the combat began, I started spending time on the front lines, continuing to do so for six months, mostly in the company of the special forces.

ISIS captured Mosul in June 2014, when the organization was at the height of its power, its territory in Iraq and Syria encompassing thousands of square miles. With roughly 1.3 million residents, Mosul was the second or third ­most ­populous city in Iraq — many times the size of the caliphate’s capital, Raqqa, Syria — and the most diverse and historically rich. By last fall, however, ISIS’s territory had shrunk considerably. The recapture of Mosul from the Islamic State would not mean the organization’s end, but it would be the most unmistakable death knell yet for the caliphate as a place.

The firefights that began that night in Zahra persisted into the dawn, mingling with the bird song. The men prepared to assault an adjoining neighborhood. The commanding officer, a major, found a house whose roof afforded a good vantage of the route in. On the floor of its still-dark main room were what at first appeared to be long bolts of fabric. Only when the major stepped around them did I see that this was the family who lived here, huddled under layers of blankets. They slept together in the center of the house in the event a wall was blown out during the night.

On the street, a tank and an armored bulldozer waited ahead of two columns of Humvees. Locals emerged from their houses, tentatively, then enthusiastically. Parents sent their children to make tea for the soldiers. They brought them bread, sweets, whatever they could spare. The soldiers shared cigarettes, still a precious commodity in Mosul’s newly retaken parts.

A special-­forces general gave the order to move. The columns reduced to a single line to cross a boulevard strewn with wrecked cars, downed shop awnings, the trunks of light poles, and then filed into a labyrinth of increasingly narrow streets. The fighting was close. A boy stepped from a doorway, and a soldier yelled at him from a Humvee window, “Go back inside!”

We came to a stop before a soccer field. On its far side was a mosque, its minaret about seven stories high — an obvious sniper perch. The general stepped from his Humvee and glanced up indifferently. Encouraged by the sounds of the soldiers, a father opened the front gate of his house. His wife and daughter peeked out. The general walked to them, wearing neither flak jacket nor helmet, carrying not even a sidearm. He shook the father’s hand, patted the girl’s head, accepted a kiss from the wife.

‘They claimed they’d save us from the infidels and that they would return us to real Islam.’ Credit

As if on cue, a shard of pavement popped up near the general’s feet, followed by a faint snap. Then something ricocheted off his Humvee with another snap. The family disappeared behind the gate. Soldiers leapt from the street. The general looked at the minaret with scarcely more interest than before, then walked with his back to the mosque, unhurried, and finally sidestepped behind a Humvee with a contemplative grin.

The sniper kept firing. He put a round into the turret of the Humvee in which I was sitting, above my head, then one into the windscreen of the Humvee behind mine, a third into the side mirror of the one next to mine. The minaret was about 400 yards away, and this marksman apparently intended to showcase his expertise, picking apart the vehicles while he waited for one of us to stumble into his sights. A special-­forces gunner peppered the minaret with .50-­caliber rounds, another with grenades from an automatic launcher. The facade crumbled and smoked. It was a Friday, the day of prayer and rest in Islam, the most inconsiderate day to be shooting up a mosque, and ISIS, maybe taking this engagement as sacrilege, loosed a wave of mortar fire.

I took cover in a house, where I found the major on the roof, smoking and drinking a Red Bull beneath a clothesline. A car bomb detonated, shaking the block. “They are good fighters,” the major said of the enemy. Like most Iraqi soldiers, he was willing to give credit to the jihadists. Whatever else they might be — lunatics, half-wits, junkies, fake Muslims, pawns of foreign powers, there were as many theories as soldiers — they were not cowards. “They want to die,” it was said every day, and this was neither an insult nor a cliché. “I respect them,” the major confided. “People need to die. They have the loyalty for that. I know their loyalty is in the wrong place, but most of their fighters, we’ve found, they have that loyalty. It’s difficult, in an army, to find a fighter who’s ready to blow himself up, to fight until he’s dead.”

As he spoke, an ISIS propagandist got onto a nearby loudspeaker.

“Fight the infidels!” he bellowed. “Fight them because they are American agents! They are Israeli agents!”

During the battles for Ramadi and Falluja, the biggest campaigns before Mosul, most residents fled or were evacuated before the fighting. Many Moslawis stayed, making for a more complicated operation. Some did so because ISIS was killing people who tried to escape, some because they refused to forfeit homes or leave family, some because they worked for ISIS in some capacity — but many because the government asked them to. It dropped handbills from helicopters requesting that residents not flee. It did this in part because Iraq, which has had 3.4 million people displaced by the war, could not absorb another wholesale exodus. But the generals were also betting they could use the civilians to their advantage. If the security forces treated Moslawis well, the people could be a source of assistance, intelligence, good publicity.

And initially, the wager paid off. The soldiers gave civilians food and medical care, helped them salvage their homes and bury their dead, brought them bottled water and shared their mobile generators (water and electricity service had been cut off). Many soldiers I knew genuinely felt for Moslawis. As one put it to me: “I know you have ISIS in America. But in America, they do a bombing. Here they’re killing my people every day.” The Moslawis in turn opened their homes to the soldiers, cooked for them, identified collaborators and booby-­traps. The interactions were often very touching to watch, especially because most of the soldiers were from elsewhere and were Shiites, while most Moslawis were Sunnis. Mosul’s was an oddly civil battle, in the best sense of the term. This despite the soldiers’ knowledge that many of the locals had abided ISIS, and very possibly had done more. You could call it a suspension of disbelief, but the deeper impulse may have been a certain national preference for forgiveness. “You can’t take vengeance for everything bad someone’s ever done to you in Iraq,” one scholar told me. “If you did, everyone would be dead.”

A line for aid in western Mosul in April. Credit Peter van Agtmael/Magnum, for The New York Times

The generals’ strategy also meant that in order to protect civilians, the operation had to move slowly. The troops methodically inched their way westward, causing as little damage as possible. Tanks and mortars were rare. Every airstrike was cleared through the high command and coalition.

In November, in the Tahrir neighborhood, north of Zahra, I spent a night with a special-­forces assault team in a commandeered house behind an avenue that was then the front line. The house was small, and the soldiers slept side by side, head to foot. The closest ISIS position was maybe a hundred feet away, but the night was quiet, and the men awoke in good spirits. They gathered around a gas burner on the floor to warm themselves and fry a pan of eggs, which they scooped up with pieces torn from circular loaves of flatbread. One man lovingly prepared a hookah, while another put on a trilby hat and scarf. I asked if he had found them in the house.

“I wouldn’t take another person’s clothing,” he said, sounding almost insulted. He carried the accessories in his rucksack. This was his morning leisure wear.

“I screwed your sister last night,” the hookah preparer said.

“No, excuse me, I screwed your sister last night.”

With a firefight raging on the avenue, the team moved from house to house, looking for positions. In Ramadi or Falluja, it would have laid siege to the block. Not here. Most of the homes were still occupied by owners or families taking refuge. Some cowered in back rooms; others sat unperturbed in dens and kitchens. In one home, the team found a retired English teacher and his wife. “Tell them about the mosque,” she said to her husband. “Tell them everything.”

“In the mosque around the corner, ISIS stored weapons,” he said.

They gave the team a stepladder to get them over the back wall and into an empty house facing the avenue. The soldiers quietly ascended to the roof. Ducking below the parapet, they put a hole in its base with a sledgehammer and chisel. A sniper laid on his stomach and checked his scope.

Next they came to a house where five families had been holed up for days. The children — there must have been two dozen of them — sat in tidy rows in a hallway. In the next house was a family and its neighbors. A man recounted being questioned by ISIS’s feared religious patrolmen. “They said, ‘Why have you shaved?’ I told them I hadn’t shaved; I just can’t grow a beard. They didn’t believe me. They said: ‘Are you playing with us? Who gave you permission to shave?’ I told them, ‘I swear I haven’t shaved.’ ” Another man said: “I couldn’t even buy underwear for my wife. ISIS didn’t like the pictures advertising the underwear. They said these pictures came from the devil. You couldn’t buy anything — even perfume. They didn’t like the perfume pictures either.”

The skeletal remains of a feared ISIS fighter, whom locals called the Emir, east of Mosul. Credit Peter van Agtmael/Magnum, for The New York Times

The soldiers came to the last home on the block. If they could set up in the structure behind it, on an intersection, they would have good firing lines in three directions. The front door had a deadbolt and back plate. For 15 minutes, they took turns pounding at the bolt with a sledgehammer. Hearing the ruckus, more men came in to take turns, until the entranceway was full with panting soldiers. A burly young man stepped in and, with a tremendous whack, sent the bolt flying. “Is there anything else I can do for you?” he said, taking his exit.

Inside, they found the remnants of a hasty exit. The television had been removed from its wall mount and a display case with the family silverware turned to the wall. The refrigerator was empty save for four ramekins of pudding, as though the family had eaten a final meal but decamped before dessert.

It took a half-­hour for the soldiers to break through another gate and climb into the house they wanted to get to, only to find no windows onto the avenue. It was useless. As we went downstairs, an explosion rocked the earth, sending plaster to the floor and a squall of debris up the street. It had come from the special forces’ part of Tahrir and was too big to have been a mortar. Outside, the distinctive billow of a car bomb rose into the sky, with its long stem and squat plume, eerily like a nuclear mushroom cloud. The blast killed a popular gunner. Another man had been felled by a sniper in front of me. There were numerous other casualties. The total ground taken by the company at the end of the day amounted to a few square blocks.

At the main position, soldiers had set up a small infirmary — a pile of drugs and a stretcher — where locals came for help. Some intrepid residents had reopened a market nearby. ISIS was shelling it insistently. Adults and children perforated with shrapnel and fragment were rushed in. Others came with dormant prescriptions and headaches. A girl arrived having swallowed her chewing gum, the look of terror in her eyes worse than what I’d seen in children who had been shot.

An old man with a flowing white beard hobbled in carrying a death certificate, his wife’s. She and their four children were killed in a shelling. Soldiers had helped him bury the bodies. He heard the government was compensating survivors. A sergeant major took the man inside to a portable printer. As he made copies of the certificate, he explained they would have to be sent to a ministry in Baghdad for approval. The man didn’t understand. “Will the government compensate me?” he asked.

“Yes, but father, believe me, the stamp you need is in Baghdad,” the sergeant major said.

“Please, I need it stamped.”

“Father, do you think we’re ISIS?” another soldier said. “That we’re going to kill you? We must send the certificate to Baghdad.”

“Please, I need your help. I’m very tired. I’m an old man.”

“I swear, there’s nothing more I can do for you,” the sergeant major said.

All special-­forces soldiers, indeed all Iraqi forces, from the most experienced to the greenest, wore flak jackets and helmets only when ordered to by commanders, commanders only when ordered to by generals and generals never. When I asked why, I was told some variation of “it can’t protect you.” This was not an indictment of the gear, it took a while to realize, but an expression of a rich fatalism, an alloy of courage and resignation and faith. It was another way of saying, “If God wants me to die today, so be it,” a sentiment you heard in so many words all the time from the soldiers and everyone else.

The attitude extended to suicide. A soldier told me about an ambush he was caught in: 35 casualties, a dozen vehicles totaled. They were pinned down overnight. He wasn’t scared of dying, he said, but “was scared of them taking me alive. So I spared a bullet. I call it — we call it, all of us — the mercy bullet. When you are surrounded, you kill yourself.”

By January, the troops had pushed ISIS to the Tigris. The jihadists were confined to a few last redoubts in the east. I rode to one, a neighborhood called Arabi, with a general who had the shape and tenor of an active fire hydrant. His convoy drove down a highway at the foot of a hillside. On the hilltop was a church whose large cupola had been knocked off its foundation and onto its side, somehow remaining in one piece, its vault exposed to the sky. Crowds of families walked up the highway in the opposite direction, away from Arabi. This exasperated the general. Didn’t they know he was emancipating them? He waved down a family.

“Why are you leaving?” he demanded.

“Everyone else left,” the father said.

“Everyone! Where are you all going?”

“Hadba.”

“Well, just stay there, I suppose.”

The convoy entered Arabi, an upper-­class district of recently built, free-­standing homes. On a sidewalk, in three piles, was what had once been an ISIS fighter, possibly a suicide bomber. The most recognizable section included his head, shoulders and arms. His right hand was still clenched, as though around a detonator.

The general arrived at an intersection where his soldiers had gathered to celebrate. Arabi had just been officially taken, or so they had been told, though no one had told the general this, and gunfire still rang out nearby. Civilians emerged from their homes. As the general walked up the street, they embraced him and took pictures with him. A woman, her cheeks wet with tears, kissed him.

“God bless you, God protect you,” she told him. “We’re so tired. But now we can eat comfortably.”

“We will raise the Iraqi flag now,” her son said.

“When I first saw the soldiers, I started kissing them,” his mother went on, more excited with every word. “Kissed all of them! I can’t contain my happiness.”

“She did!” her son said. “She even kissed their feet. I can’t blame her.”

‘I spared a bullet. I call it — we call it, all of us — the mercy bullet. When you are surrounded, you kill yourself.’ Credit

The convoy pulled out of Arabi and back onto the highway, a group of officers on foot alongside it, none of them wearing protective equipment. They hadn’t been moving long when a shell came in with that familiar, quick thrum. There was a blast, a hail of fragment and debris, a gust of smoke, then silence. Momentarily the air cleared. Cut down on the ground before me, quicker than seemed possible, were four perfectly dead officers.

Immediately it was obvious what had happened: an ISIS informant in Arabi had seen the general, tracked him and alerted a mortar team. Perhaps the general had unknowingly spoken with the artillerist. Perhaps they’d hugged.

The general and his staff jumped from their vehicles and ran to the injured survivors. Another shell crashed nearby. Two ambulances sped in and loaded on three corpses. The last was laid on the hood of the general’s Humvee. We followed the ambulances back up the highway, past Arabi, to a command post. The corpses were already in body bags in the courtyard. Soldiers bent over them, weeping and yelling. The general stood alone on the far side of the yard.

“Bring a flag!” wailed a kneeling man.

“Put it around the edges,” the general instructed from across the yard when the Iraqi flag was finally brought. The folding displeased him. He marched over and neatly tucked the corners between the body bag and the stretcher.

“Screw these Mosul people!” a soldier said.

Civilians fleeing a neighborhood in Mosul. Credit Gabriel Chaim for The New York Times

II. Khazir Camp

Despite the efforts to get them to stay, every day civilians fled the front-line neighborhoods of eastern Mosul, which was declared liberated in late January. They fled in families, groups of families, whole city blocks’ worth of families. They dragged bursting suitcases and waved broomsticks and lengths of plastic piping tied with white cloths to signal to the soldiers their docility. The old and the sick were in wheelchairs, wheelbarrows, slung on backs. The dead were wrapped in blankets and pushed along in handcarts and wagons. The families congregated at a holding facility on Mosul’s eastern edge, a half-built home whose gate had been shelled away. In front idled a row of open-top freight trucks. Once their trailers were full with human cargo, they would drive to one of the 68 camps for displaced people that have been erected in Iraq since June 2014.

Entering the home’s courtyard one day, I met a stout, disheveled man wearing a fraying sweater. His face was unevenly shaved, and his penetrating eyes were laughing and frantic behind dirty glasses. They seemed to ask, Can you imagine this hell?

He went by Abu Omar. He was with his two daughters and was eager for information. Where would they be taken? When could they return? Journalists got these questions all the time: When Moslawis saw a foreign face, they assumed it belonged to an authority, and when they learned you were American, their expectations made you feel grandly useless. Americans could and did do anything, you were assured. Among other assumptions, they took it for granted that the United States was controlling this war, from both sides. “This was all planned 20 years ago,” Abu Omar told me of the battle. “America planned it.”

I found Abu Omar, 48, and his daughters again in a camp known as Khazir, an hour’s drive east of Mosul, and took to visiting them there regularly. It was in an improbably bucolic setting, on a hillside next to a river in Iraqi Kurdistan. Inside the camp, however, the atmosphere was humid with suspicion. Kurdish soldiers and agents, many of whom had fought ISIS, presided over Khazir. “They tell us, ‘You’re all ISIS,’ ” Abu Omar told me on one visit.

WESTERN MOSUL

Old City

EASTERN MOSUL

Khazir

Tigris River

2 miles

Map of the Khazer refugee camp. Credit

His tent was situated between a storm fence and the toilet that serviced his block — four holes in the floor for dozens of families. For washing and cooking there was a water tank with a few unenthusiastic spigots. The winter rains had begun, and there was mud everywhere. Rats roamed at night. “We thought the government would take care of us after we lived under ISIS for so long,” Abu Omar said. “But it’s the same crap here. It’s like a jail.”

There hadn’t been regular water service in Mosul before he left, he said, and he hadn’t prayed in months. “To pray, you must be clean. Islam is clean.” But the real problem was that ISIS had soured him on the whole idea. “God forgive me for saying it, but now I don’t even like to hear the call to prayer. I hate it because of them. God forgive me. On Fridays, their preaching was all instigating people to kill, to deceive one another, to pillage. This is not our religion.” Suddenly his eyes brightened with that frantic laugh, and he exclaimed: “Will you take me to America? Why don’t you take us to America? Take me out of Iraq.”

Abu Omar came from a working-­class Mosul family. After being conscripted into Saddam Hussein’s army in the mid-1980s, he was sent to fight in Iran. Mosul wasn’t bombed in that war to the extent that Baghdad and Basra were, but it suffered in its own way: A majority of the officers’ corps came from the city, many of them from Mosul’s oldest families. Long before Hussein took power, the city had a formidable martial reputation.

It began as a settlement around 900 B.C. on the Tigris’s west bank, across from the more famous Nineveh, whose ruins Mosul now encompasses. In the ninth and eighth centuries B.C., Nineveh was one of the most populous cities in the world, archaeologists believe, in the largest empire of its day — the Assyrian — maintained by an army so fierce that God made it his “rod of anger” to punish the wayward Israelites, according to Isaiah. To the Hebrew prophets, Nineveh was a cruel paradox of a place, the flower of iniquity and the instrument of righteousness. The Assyrians commemorated their massacres in carved reliefs whose antic violence is still unsettling to consider, not least because it prefigures ISIS’s agitprop by 3,000 years. God would eventually lay waste the Assyrians too, of course. “Even today,” the historian John Robertson writes, the biblical picture “shapes our views of Iraq as a place cursed by history.”

The Khazir camp for displaced civilians who have fled Mosul and other areas. Credit Peter van Agtmael/Magnum, for The New York Times

After the Assyrians passed from power, Mosul found itself wedged between the Roman and Parthian Empires, then Byzantium and Persia, then Turkey and Iran. Home to all the Abrahamic religions, Mosul was also sanctuary to their precursors and persecuted offshoots: Zoroastrians, Yazidis, Christian schismatics, Jews, Sufi Muslims and various mystics and heretics unwelcome elsewhere. Governed at different times by Sunni and Shiite caliphs, Mosul was on the fault line of Islam, though even religiously conservative Moslawis are proud of their city’s history of diversity. Abu Omar told me, “I am a Muslim, but my neighbors were Christian, and I never saw any harm from them.”

They’re also proud of Mosul’s history of resistance to the Ottoman Empire and to Baghdad. The British diplomat Gertrude Bell wrote in 1911, “Mosul has always been against the government, whatever form it should happen to assume.” Mosul was one major Iraqi city never to erect a statue of Hussein, according to longtime residents. Bell’s colleague Mark Sykes, an author of the Sykes-­Picot Agreement, which carved up the Levant to the specifications of the British and French Empires, was less charitable. He found Moslawis “ready to riot and slay for the sake of fanaticism as long as there is no danger.”

After Iran, Abu Omar was sent to Kuwait. He didn’t agree with that war but didn’t dare disobey. He was terrified of Hussein, it went without saying, but that was nothing compared with the terror to follow. When the Americans deposed the Iraqi president, he said, “we felt happy. But if we had known things would turn this way, of course we would have wished to stay under him.”

In 2005, Abu Omar’s wife was kidnapped. Her body was found in a street in another neighborhood. He believes she was killed by militants, though accidentally. Before finding a job as a security guard at a cellular tower, he did not have regular work, and unable to feed his children, he put them in an orphanage.

“They’ve only known war and destruction,” he said. His daughter Amina, now 12, was anemic, and, he added — lowering his voice, though not so low that anyone could miss what he said — “Aya has a mental disorder.” Aya, a sweet-­natured girl who at 13 looked both older and younger than her age, did not seem to outward appearances to suffer from anything worse than painful shyness; she looked down at her folded knees as her father said this. As for the 18-year-old Omar, his father went on, while he might look big — he was a mass of undeveloped bulk — he had “the brain of a child.” Omar, who had been in the corner of the tent praying, smiled mildly. This obviously was not the first time Abu Omar had insulted his son in front of a stranger.

Abu Omar and his daughters, Amina (foreground) and Aya. Credit Peter van Agtmael/Magnum, for The New York Times

Omar arrived in the camp two weeks after the rest of his family. He was detained by the special forces after they retook Zahra, Abu Omar told me — pro forma for young Sunni men. “The ones who had some connection with ISIS, they beat them very badly and took them away,” Abu Omar explained. “Those who had nothing to do with them were kept for a few days, then brought here.”

“They blindfolded all of the guys with me, but they didn’t blindfold me,” Omar said boastfully. It was unclear whether he wanted to impress his father or me or both of us. “I was the supervisor of all the other prisoners.”

“Because he was not involved with ISIS,” his father repeated.

Still, Abu Omar and Omar both readily admitted that they had at first welcomed ISIS. To understand this, they said, I had to understand the city’s recent history. In the early years of American occupation, Mosul was safe, one of the few major cities spared looting and the early sectarian violence that tore apart Baghdad. But inevitably a militant underground coalesced. It began with former soldiers and officials — men not unlike Abu Omar — who had lost their jobs and pensions when the United States disbanded the military and tried to purge members of Hussein’s Baath Party from office. They were joined by coreligionists and criminal rings, the lot of them colluding and competing over smuggling routes and extortion rackets. Ideology and criminality commingled.

In 2006, Abu Musab al-­Zarqawi, Al Qaeda in Iraq’s founder, who envisioned a modern-day caliphate in the country, was killed in an American airstrike. His followers were squeezed northward by the Sunni Awakening and the “surge” of American forces. Regrouping in Mosul, with a consortium of other jihadists they began referring to themselves as the Islamic State of Iraq. The city was its base and main revenue center. It co-­opted and assassinated officials at all levels of the local government, courts and police force. But for all its depredations, the insurgency wasn’t as despised as the national government. By 2010, most of the Iraqi soldiers patrolling the city were Shiite and not from Mosul, and they treated Sunni men as though they were all militants, jailing them and beating them. When Abu Omar crossed the city, he had to wait at checkpoints for hours. Soldiers insulted Omar routinely. They “turned Mosul into a hell,” Abu Omar told me.

By the time ISIS activated its operatives in Mosul, in the first days of June 2014, and dispatched columns from Syria toward the city, it was theirs for the taking. Whether through anguish or pragmatism, or both, many Moslawis had come to see ISIS, barbarous as it was, as the only alternative to the government in Baghdad. “Religious ideology might have been the last point of identification for many Moslawis who joined ISIS,” Rasha al Aqeedi, a researcher from Mosul, told me.

When ISIS arrived, “they came in as revolutionaries,” Abu Omar said. “Once they took control, there were no more checkpoints, no traffic jams, no arrests of young people, no beatings,” Omar added. “There was freedom.” The jihadists cleaned up the city, lowered rents, collected donations for the poor. They promulgated a new city constitution, whose 16 clauses encouraged Moslawis to live peaceably, forbade the ownership of weapons and promised justice for all.

Abu Omar’s house was opposite the mosque from which the sniper shot at the special-­forces soldiers in November. He and Omar had gone to that mosque, al-Nuaimi, every Friday for years. In all of Mosul’s mosques, ISIS installed loyalist imams — some of them foreigners, some Moslawis who sided with the group. At al-Nuaimi, the imam who took over, one of the locals, called himself Abu Bakr, like ISIS’s caliph, Abu Bakr al-­Baghdadi. Preaching with a rifle slung on his shoulder, he exhorted the young men who flocked to him to attack their parents if they objected to jihad. As the Iraqi troops approached Mosul, he hollered from the minbar: “Kill the Iraqi Army! Kill whoever wears the uniform!” Omar went every week. “I didn’t miss a sermon,” he told me.

The imam often had a videographer in tow. Like ­Baghdadi, he believed he was instrumental in history — more to the point, in the end of history. ISIS erected billboards at checkpoints outside Mosul, like states’ welcome signs, reading, “The Islamic State: A Caliphate in Accordance With the Prophetic Method.” The climax of the prophecy was Armageddon. ISIS was here to usher it in.

“Do you know what they do?” Abu Omar said. “They tell you: ‘Son, you are doing jihad for God. You will be martyred and go to heaven. There are mermaids in heaven. You will eat lunch with the Prophet.’ ”

Omar frowned. To him and his friends, there had been nothing jocular about the imam. Abu Bakr was powerful, brash, unafraid to question authority. He was everything their parents — beaten down by years of hardship, humiliated, afraid of everything, it seemed — were not. The imam told Omar he was a warrior in waiting who would deliver this world from unbelief. “I believed him,” Omar told me. “It made sense to me.”

While Omar talked, his father kept interrupting to temper his son’s confessions. Finally, Abu Omar confessed, “If it wasn’t for me, Omar might have joined them.”

I asked Omar if this was true. “Yes, if it wasn’t for my father, I would have been in ISIS for sure. They could have brainwashed me.”

Over his adult life, Abu Omar had fallen out with all of his siblings save one, a brother who goes by Abu Fahad. Abu Fahad, 50, fled Mosul shortly after Abu Omar, and when he and his family arrived at the Khazir camp, they moved into his brother’s tent. Abu Omar told him it was too crowded, and Abu Fahad left in a huff. They hadn’t spoken since. Though they were living in the same camp, they were too proud to effect a reunion.

“He knows where to find me,” Abu Omar grumbled. But there was something else pushing them apart: According to Abu Omar, Abu Fahad’s older son had joined ISIS.

‘We thought the Americans were their target. But they weren’t. We were their target. Our money was their target.’ Credit

Abu Fahad had the same high forehead and penetrating eyes as his brother, but his didn’t laugh. Exile was a more stinging indignity to him. Trimmer and better groomed than Abu Omar, he was also cleverer, having been an army medic and then the chief nurse at a Mosul hospital. His younger son, Hamudi, was two years younger than Omar but much more mature. While Aya could barely bring herself to speak in my presence, Abu Fahad’s daughter Maha wanted to discuss history and politics, religion and movies. And yet here they were, reduced to exactly the same circumstances as Abu Omar and his family.

The same year that Abu Omar’s wife was killed, Abu Fahad’s wife was shot while they were driving in Mosul, he believes by Kurdish and American soldiers. His children were in the car. As Maha and Hamudi listened, Abu Fahad recounted to me the crash of the bullets coming through the windshield, his harried pressing on the brake pedal. He was dragged from the vehicle and beaten unconscious by the soldiers. Coming to, he found his wife’s body beneath a blanket. His eldest daughter, who had watched her mother’s head explode, he found in the back seat, trying to eat shards of window glass.

“She went insane,” Abu Fahad said. She never entirely recovered.

By this point in the story, Maha was crying, while Hamudi stared fixedly at the ground.

“Let’s change the subject, please,” Abu Fahad said.

When ISIS arrived in Mosul, “we were one of the families who welcomed them,” he told me. “They claimed they’d save us from the infidels and that they would return us to real Islam.” Like most Iraqis I’ve come to know who supported ISIS initially, Abu Fahad was not a zealot. He wasn’t even particularly devout. He had, however, watched his country invaded and plunged into horror; his city degraded from a “heaven,” as he described the Mosul of his youth, to a battleground; his wife killed; himself humiliated by soldiers of the army he once nursed to health; his children denied a future. To a man in such circumstances, talk of a religious utopia, of any utopia, of any improvement of life beyond the malediction it had become, however fantastical the promises, however deranged, held a desperate appeal. “They said they would not stop until they reached Rome,” he told me with a rueful grin. “I thought, let’s start with Baghdad, then we can talk about Rome.”

Abu Omar’s brother Abu Fahad. Credit Peter van Agtmael/Magnum, for The New York Times

Sounding like a resident of Washington recollecting a smooth presidential transition, he said: “They took over the city so capably. By the next morning at 10, they were driving around Mosul as though they’d always been there.” For a time, life went on normally. Abu Fahad stayed on at the hospital — ISIS made a point of keeping the hospitals open, along with providing other vital public services. Many public employees kept their jobs under ISIS. Others took jobs with the group — as traffic officers, court clerks, garbage collectors and so forth. To an outsider, this is unimaginable, but to Moslawis, ISIS was now the government, whether they liked it or not. They had to survive.

I asked Abu Fahad about his older son, Loy. He did not know that Abu Omar had told me Loy was in ISIS. Abu Fahad conceded, “He was very religious.” He’d been driven to extreme devotion by his mother’s death. “And to tell you the truth, he did support their ideology.” But Abu Fahad emphasized, “He didn’t support their actions.”

When I visited Abu Omar at the camp, he was always eager for news from the front, though he usually knew more than I did. Local Mosul radio and TV stations were already back to work, and he kept a radio on all day. The camp was very cold at night, but he sold a space heater to buy a TV. He had not watched one in months. At first, he explained, ISIS had allowed Moslawis to keep their satellite dishes and modems. But soon enough, those were confiscated. That had been the general trend. They might have come as revolutionaries, Abu Omar said, but they were leaving as murderous tyrants, to say nothing of thieves.

There were the public sadisms of which the world learned. Then there were the lesser-­known outrages. ISIS pilfered nearly $425 million from Mosul’s Central Bank, according to a United Nations Habitat report, even as it imposed a mandatory tax for “charity” on Moslawis and extorted private businesses. Construction and public-­works projects came to a standstill; factories closed, and as they did, ISIS dismantled them and shipped off their equipment for sale abroad. By 2016, the report found, as much as three-­quarters of the city’s industrial enterprises and a comparable share of its government infrastructure were destroyed. And that was before the coalition’s bombing campaign began in earnest.

When ISIS shut down the mobile-­phone networks, Abu Omar lost his job. When the government in Baghdad ceased paying employees in Mosul, Abu Fahad went broke. ISIS took over grain silos, flour factories, bakeries, farms. They smuggled out millions of barrels of oil and gas, driving up prices, and seized properties of Moslawis, renting or looting them. “It’s all a lie,” a provincial government official I spoke with remembers thinking. “We thought the Americans were their target. But they weren’t. We were their target. Our money was their target.”

When the roads into Mosul were blocked by security forces, the shops went empty. Power and water service were reduced to a few hours a day. ISIS razed historical structures, including mosques, and demolished and burned artifacts and irreplaceable books. It took over the schools, imposing its own bellicose curriculum. At Mosul University, it shut down every department except medicine and engineering. When a student I know who had been a history major asked why, he was told: “We have a new history. We have the right history.”

When we discussed ISIS, Abu Omar, like just about every Moslawi, dismissed as naïve the notion that the organization might have arisen from the caldron of Iraqi history alone or that it functioned independently. It was a global conspiracy, he was certain: The government in Baghdad was of course involved, despite being Shiite-­dominated and ISIS’s being by definition Sunni; so, too, was Saudi Arabia (the money), Turkey (the border), Iran (sheer Persian perfidy) and Israel (Jews control everything). But the conversation invariably came back to the United States.

One day when we were discussing the imam Abu Bakr, I asked Omar what he liked so much about his sermons. Omar smiled sheepishly.

“I don’t want to say,” he replied. “You are our guest here, and I should respect you.”

I told him I wouldn’t be offended.

“All Americans are pigs. Filthier than pigs,” Omar said. “Americans — no, he wasn’t calling them Americans, he was calling them Jews — he said the Jews want to destroy Islam.”

Abu Omar said that, much as he disliked the imam, he had to concede the accuracy of this point. “The real founders of ISIS are America and Israel,” he said.

“How’s that?” I asked.

“Do you really think America, with all its technology and strategy, with all its strength, that it couldn’t defeat ISIS in a day if it wished?”

I told him that I thought ISIS was a very effective insurgency and that any military would struggle against it.

“Not the American military,” he said. “How was it ISIS was even able to enter Iraq? How was it they were able to expand as they did? An American satellite can reveal what’s inside your stomach. They couldn’t see this? When the Americans withdrew from Iraq, they said, ‘As soon as we leave, the country will return to chaos.’ ”

His secret history of ISIS stretched back to the 2003 invasion, then to the Persian Gulf war, then to the collapse of the Ottoman Empire and arrived at the Sykes-­Picot Agreement, signed in 1916. The centennial had not escaped his notice.

“So you think ISIS was conceived a century ago?” I asked.

“No, I am saying this has all been planned. I cannot explain to you how, exactly, because it’s a very deep scheme. Bigger than me, bigger than you, bigger than all of us. Very deep politics. But it was all planned.” Sighing, he concluded, “I don’t know, but I know the main reason for Iraq’s destruction is America.”

These ideas are ubiquitous among everyday Iraqis, whose various and conflicting notions about the Islamic State’s underwriters oddly mirror ISIS’s own claims (“Fight them because they are American agents! They are Israeli agents!”). They are particularly baroque among the troops. I was informed by many soldiers that the Obama administration was not just not doing enough to fight ISIS but was actively backing it. “Obama doesn’t help us,” a special-­forces sergeant major told me. (The Iraqi Special Operations Forces had been trained and funded by the United States, including the Obama administration, to hunt terrorists. It used American equipment and in the battle of Mosul enjoyed on-­demand American air and artillery support.) “He doesn’t like us.” A comrade agreed, “Obama supports ISIS.” Other soldiers informed me that they had seen American aircraft dropping supplies to ISIS. And almost every soldier I spoke with after the American presidential election claimed to eagerly await Donald Trump. Some hoped he would attack ISIS, others Saudi Arabia, Turkey, Iran, all of them.

“Obama smashed Iraq,” Abu Omar said. “And Trump? Trump will not leave any humans alive in the universe.” He held the two men in almost equal disdain. “I only like Trump because he might screw Iran.”

Iraqis looked forward to an American president who fit their idea of one, which as far as I could make out meant a belligerent, imperious white man. Trump’s statements about Muslims didn’t bother them. They were going to be mistreated by any American leader, they figured. At least Trump was open about it.

A bomb is dropped on Mosul's Old City during the battle. Credit Gabriel Chaim

III. Western Mosul

The combat on the west side of Mosul commenced in early March with a bad omen — a flock of them. ISIS engineers had figured out how to rig grenades and mortar rounds to the undersides of their drones with a catching mechanism that connected to the drone’s headlamps. When the pilot turned on the lights, the munition armed and released. As troops made their way into the outskirts, enemy quadcopters swarmed over them, dropping the small bombs. The coalition devised a way to sabotage the drones electronically, and by the middle of the month, the troops had breached the southernmost neighborhoods.

It had taken them three months to capture the east side, which was damaged, of course, but not overwhelmingly. Within a few weeks of operations in the west, it was clear that the damage here would be vastly worse. Already whole neighborhoods were leveled. ISIS had always been less popular in the east, Mosul’s more diverse half. The west was where Sunni discontent had run the highest, where Al Qaeda had been the strongest and where ISIS, it knew all along, would make its last stand. “Any creature, when you corner it, gets more aggressive,” a special-­forces major told me. “They know they’re going to die.”

The destruction was all the more upsetting because the west was not just home to a majority of Moslawis but to the city’s past. Aside from the ruins of Nineveh, the east had been built up mostly since the Baathist era. The west, however, contained mosques, shrines, churches and monasteries dating back to at least the eighth century A.D., museums and libraries and the Old City, with the historical centerpiece of Al Nuri Grand Mosque. The mosque was supposedly the work of Nur al-Din, who repelled the Christians of the Second Crusade. It was Nur al-Din who reportedly inspired Abu Musab al-­Zarqawi to conceive of the Islamic State, and it was at the Grand Mosque that his successor, Abu Bakr al-­Baghdadi, proclaimed himself its caliph. The mosque’s famous leaning minaret could be seen from around the west side, overlooking every skirmish, pulling jihadist and the soldier alike toward it like true north on a compass. Not until the minaret fell — and the combatants knew it would have to fall, by one hand or the other — would the battle be done.

To meet ISIS’s redoubled aggression, pressure from the air was increased. American ­Apaches and Iraqi Hind helicopters now menaced the jihadists constantly, the roar of their guns and cannons, which poured down thousands of rounds a minute, seeming to tear the sky asunder. ISIS in turn stepped up its attacks on civilians.

WESTERN MOSUL

EASTERN MOSUL

Mosul Jidideh

Khazir

Tigris River

2 miles

Map of Mosul's Jadida district. Credit

One morning, soldiers were overseeing food distribution in the newly retaken Mosul Jidideh, a pleasant area of narrow tree-­lined streets, plazas and old homes in the center of the west side. A crowd of a few hundred gathered. On a side street opposite the food trucks, a mother who fled the fighting with her children had moved into an abandoned house. Outside it, she and her two sons had set up a small grocery.

Predictably, ISIS learned of the distribution almost as soon as it started. A shell came in, hitting the grocery. The crowd bolted. Out of the smoke-­filled street, civilians carried a soldier, a hole in his leg gushing blood. He was lifted into a Humvee and rushed off. A man, conscious but the color of death, his chest a confusion of entry wounds, was laid on the curb. Beside him was set down a boy whose injury was unapparent but whose face suggested something dreadful.

A flatbed truck raced up. The less-­wounded climbed in. As the boy was handed up, his insides spilled from a gash in his abdomen. By the time the man was lifted, he was dead.

‘Any creature, when you corner it, gets more aggressive. They know they’re going to die.’ Credit

He was the eldest son of the family in the abandoned house. Solitary tomatoes and torn bags of chips surrounded the shell crater. His mother stood in the doorway of the house, screaming, her daughters in the kitchen behind her sobbing. The doorstep had pooled with her son’s blood. Her younger son stumbled in, ranting and pulling at his hair. He cursed the army. First his father, a bystander, was killed, now his brother. His mother begged him to lower his voice.

“Let them hear it!” he said. “Let them hear it!”

He crumpled on the doorstep, hyperventilating, his feet in the blood.

It was a terrible cycle. The more Moslawis were killed, the more they blamed not ISIS but the soldiers for bringing this war upon them. And the more soldiers were killed, the more they came to suspect ordinary Moslawis were colluding with ISIS in the fight (“Screw these Mosul people!”). The inevitable breakdown of the strategy of encouraging civilians to stay, it came to a head in mid-­March, when a coalition airstrike resulted in the deaths of more than 100 civilians in Mosul Jidideh. A Pentagon investigation found that the strike hit an ISIS explosives cache, but by the time the report was released, the damage had been done.

A girl who lost a leg in a rocket attack undergoing treatment at a hospital in western Mosul. Credit Peter van Agtmael/Magnum, for The New York Times

There was no doubt that some soldiers, maybe many, did not heed the orders to protect civilians. In early March, as the troops surrounded the Old City, I spent an afternoon with a unit of infantrymen who had just taken a stately old rail station, in the process shooting it to bits. Now they were trying to dislodge a nearby contingent of enemy fighters. Not as well funded as the special forces, they had to improvise much of their equipment. They had fortified their personnel carrier with sandbags, fastening them to the vehicle’s sides with chicken wire. Their prize possession was a multilaunch system consisting of a trio of immense handmade tubes welded onto the back of a Humvee.

The men parked the Humvee with its hood facing vaguely toward ISIS. A tail fuse was lit. From a tube launched a rusty projectile the length of a man and the width of an elm trunk. It hurtled in a high arc, spinning like a poorly thrown football, and landed a few blocks away with a dismal rumble. Four of these bombs were launched, each time an officer yelling, “Blasting in the name of the Prophet!” It was unclear whether he was serious or glib, but it was clear that if there were civilians near the detonations, there was little chance they were alive. I asked the officer how the aiming was done.

“I don’t want to talk to you,” he said. “I don’t want you shouting about this and saying bad things.”

Several days after the incident in Mosul Jidideh, I was with soldiers sitting in their Humvee, listening to a local call-in radio show. “What I’m hearing about what’s happening there makes me very sad,” a caller said to the host. “May God be with you and protect you. I hope ISIS all dies and burns in hell. But it doesn’t make sense to destroy an entire neighborhood because of one ISIS dog. It doesn’t make sense. It’s not acceptable. Ten thousand people are dying because of this. They’re making a second Aleppo in Mosul.”

“You’re right, it has become another Aleppo,” the host said. “Houses are destroyed. The city is destroyed. This is very bad politics. It’s a very bad plan if they want to restore Mosul.”

A Moslawi man whose eyes were injured in a mortar attack. Credit Peter van Agtmael/Magnum, for The New York Times

The favor of protection was not extended to those believed to be ISIS members. If you spent enough time in Mosul, you eventually saw suspected jihadists beaten, tortured, even murdered. Often, though, the interactions between troops and captives were not so violent as they were absurd. I was sharing a hookah with a special-­forces sergeant outside his position in Mosul Jidideh one morning in April when a middle-­aged man approached. A teenager dragged his feet alongside him. The man wanted to turn over the boy, his son, because he had taken a job as a street cleaner with ISIS. The job had lasted 10 days, a year earlier.

The sergeant, whose name was Salam, wasn’t overly interested. Nor was the son, Idris, whose expression suggested that this was only the latest in a yearslong litany of paternal complaint. “Yesterday the minister announced that those who worked for ISIS but did not bloody their hands will be forgiven,” the father told Salam. “I swear, he has not done anything bad. If he had, I wouldn’t have turned him in. I would have helped him escape.”

Salam asked Idris if what his father said was true. Idris said it was. He had been a student but dropped out when ISIS took over his school and went to work at his uncle’s tea shop. The religious patrolmen shut it down because of the hookahs.

“Did you take the job because you needed the money?” Salam asked.

“Yes,” Idris said. “To buy a motorcycle.”

I was the only person who laughed at this. “He’s a young man,” the father said. Salam nodded. A young man, a motorcycle, obviously. But, his father went on, he didn’t want Idris riding a motorcycle, and while he liked that his son was motivated to work, he certainly didn’t want him working for ISIS. Salam nodded again. And if that weren’t enough, Idris had informed his boss in ISIS of his father’s contempt for the group.

“He told them I didn’t like them,” the father said. “That’s why they jailed me and beat me.”

An audience of locals had gathered, and it murmured disapprovingly at this. But when Idris and his father agreed that whatever else their faults, ISIS had taken sanitation very seriously, the audience murmured in agreement.

“Don’t lie to me,” Salam said to Idris. “Did you join ISIS because you fought with your father?”

Idris shrugged. “Yeah.”

“This is what happened in Mosul — every kid who fought with his dad joined ISIS,” Salam said. “Well, if he didn’t do anything bad, he can just go.”

Another soldier named Ibrahim intervened. “So you were only a garbage man?” he said to Idris. “You could have at least been a fighter.” He stepped behind Idris and belligerently caressed his neck with one hand. With the other he dangled over Idris’s shoulder an adjustable wrench. It was small but he turned it in his palm and retracted and clamped the jaw in such a way to suggest it held torturous possibilities. The boy’s eyes went wide.

“Ibrahim, have you become an investigator?” Salam said.

“How do we know if his file is clean?” Ibrahim said. “What if later we find there’s more to it?”

“If we take in everyone who’s worked with ISIS at some point,” Salam said, “we’ll have to take in all Mosul.”

Regretting his decision, Idris’s father repeated that he was certain his son had done nothing wrong. It was too late. Idris was taken inside and patted down. In a bedroom in the back of the house, his ankles and wrists were tied, and he was pressed to the floor.

An intelligence officer arrived with Idris’s father, who looked dejected and yet still annoyed with Idris. “So you’re saying your son hasn’t done anything and that you’re turning him in just for being a garbage man? This makes no sense.” And to Idris: “Let me give you some advice. Just be honest with us. Tell us everything. If you don’t tell us the whole story now, and we find other sources who tell us more, you know what will happen? You’ll just be killed and tossed in the street with the rest of ISIS.”

Over the course of the afternoon, locals filed in to size up the captive. Idris looked up at them blankly and they down at him unimpressed. Ibrahim and a younger, gentler soldier walked in and out, addressing Idris with threats and placations. It turned into a vaudevillian good-cop-bad-cop routine. The gentle soldier brought Idris a Styrofoam container of rice and tomato sauce and untied his wrists. Idris refused to eat.

“Animal! If he tells you eat, you eat! Drink, you drink!” Ibrahim yelled. “If one of us tells you to throw yourself into a fire, you do it.”

“Listen, we’re not telling you to jump in a fire,” the gentle soldier said. “We’re just telling you to eat.”

“This animal here, we tell him to eat, and he won’t. Son of a donkey! Animal! Son of a sheep!”

Another soldier came in and said: “Imagine if you get married one day and have kids, and your son goes and does something like you’ve done. How would you feel?”

Idris ate. After lunch, Ibrahim took a nap on the bed across from him. When he awoke, Idris said he wanted to pray. “Of course, now you want to pray! If I were you and had decided to join ISIS, I would have at least worked in a supermarket, something that would have fed me. Not a garbage man. They’re garbage, and you were their garbage man. Garbage and garbage. How did you come up with that? What’s the matter, your head isn’t clear? Let me clear it for you.”

Ibrahim slapped Idris.

“Is it clear now?”

“I swear I’ve done nothing,” Idris whimpered.

“Don’t worry,” the gentle soldier said, “it will be all right.”

After 12 hours, he was untied and taken into the sitting room. The soldiers had tired of baiting him. Everyone ate dinner and watched the Formula One film “Rush.”

Idris was lucky. Sometimes captives were held for trial, but many commanders subscribed to a policy of summary execution. A major I met had trained as an attorney; when the war was over, he wanted to practice human rights law. He killed men he believed to be ISIS members on sight. When I asked how he squared the two, he explained that ISIS had forfeited their human rights.

“It’s true we have human rights here and that sometimes terrorists get trials, but ISIS doesn’t deserve anything like that,” he said. “They kill innocents at every opportunity.”

I offered no rejoinder to the major, who was later killed.

“For me, I love helping people — I have a good heart,” another major, whom I came to know well and like a lot, told me. “But I feel no mercy for a jihadi. I hate their existence.”

The previous day, a local family who was fleeing had taken a man to him. The man had tried to hide among them as they left, they explained. He was an ISIS fighter from the neighborhood. They knew him, but they weren’t going to protect him.

“So what did you do?” I asked.

“We took him off and shot him,” the major said.

In fact, the corpse was in a yard across the street from where we talked. He took me there. Lying on his back, his legs bent high like a frog’s, was a very short man with a sleek beard in a white shirt and black combat fatigues. His face was blackened with necrosis, and flies gathered in the hole where the occipital bone of his skull once was.

“I was looking right at him, and he was not scared,” the major said. “Everyone has this thing inside of them, a threshold of fear. I could not find his.”

By May, most of the west had been retaken and the Old City surrounded. The soldiers were ready for this battle, for this war, to be over. You could see it in their postures, in their faces, in the way they held their weapons. By the end, the battle of Mosul would claim the lives of nearly 1,000 members of the special forces and thousands of civilians, according to unofficial estimates.

I asked a soldier what he would do after the battle. “Go to Hawija, I guess, or Tal Afar,” he said, referring to ISIS’s last strongholds in Iraq. “When you sign the contract, you sign up to die.” There was a weariness in his voice that stretched beyond those places, however, beyond the inevitable official victory over ISIS. Like everyone else, he knew the insurgency wouldn’t disappear. It would go underground, as Al Qaeda had done, and wait for another political or sectarian crisis. The wait probably wouldn’t be long. Just as the palimpsest of past wars could be seen below this one, so the signs of wars to come could be read around Iraq now. Shiite militias were trying to take control of what had been Sunni lands, including around Mosul. Sunni tribal militias were expanding in response. The Kurdish pesh merga were preparing to defend the territory they occupied while fighting ISIS.

Patients at a hospital run by a nongovernmental organization in Iraqi Kurdistan. Credit Peter van Agtmael/Magnum, for The New York Times

The conversation came around to President Trump, who was trying to ban Iraqis from entering the United States. “Before he came into office, I knew he didn’t like Muslims,” another man said. “But I thought he’d take care of the nasty Muslims. Instead, he came for us.”

At dawn, I stood in a group of about 40 soldiers on a sloped street that looked down onto the Old City, over a vista of collapsed buildings and punctured domes, across the Tigris and beyond to the mountains of Iraqi Kurdistan. It was a clear, warm day — summer was at hand — and the leaning minaret of the Grand Mosque was directly ahead, set against the peaks. Black smoke rose from ISIS’s car fires, and the gunfire was already steady.

The streets were barren: The combat had been so bitter, the bombing so extensive, that more than 750,000 people would eventually flee the western part of the city, according to the Iraqi government. Every day you could see miles-­long columns of families heading south.

Leading the soldiers was a major I saw carried into a medical station months earlier with a bullet in his thigh. He had recuperated and returned to service. He marched his men onto a long commercial avenue, a picture of ruin. The shops and office buildings looked as though they had simply given up, spilling themselves onto the street. Not a soul was in sight. The pavement in every direction was deeply cratered. The soldiers climbed over rubble piles. It felt as though we were moving through the remains of some bygone civilization. They came to a small clearing with a chicken coop. Somehow, the animals were still alive.

“Jihadist chickens,” a soldier said.

A rooster followed the men as they moved on, hopping with them through a crater and cuckooing inquiringly. They moved toward an intersection. A sniper started shooting. Across the avenue, a group of civilians had emerged from the rubble and were trying to flee. In this lifeless landscape, they looked as out of place as the birds. They climbed down into an immense crater. The last in the group was an old man. He stopped in the crater’s nadir and gazed up helplessly. The group moved on until a young man looked behind him. He rushed to the crater, climbed down, folded the old man over his shoulder and carried him out. The major watched with relief.

His men took up a position in a house. The sniper shot steadily. He had a direct line on the house. As we stood inside, he put rounds into the facade. A request for air support was radioed in.

“Screw that sniper, screw Baghdadi, screw ISIS,” a soldier said.

“I’m fine with liberating Iraq,” another said. “But I’m worried they’ll send us to Syria with the Americans.”

A helicopter flew overhead, and the reassuring din of its guns filled the sky. The men relaxed.

We had been back on the sloped street for a short time when the air trembled and the distinctive mushroom cloud of a car bomb rose high above the roofs. What sounded like a firefight ensued. Rushing to the scene, we found that the bomb had ignited a command post with an ammunition cache. The cook-off lasted for almost 20 minutes, sending thousands of rounds flying into the nearby houses.

When we could finally approach, we saw, on top of a wall, the car’s chassis. The houses’ fronts were pitted and splattered in motor oil. On the pavement were pieces of the suicide driver.

Several Humvees were in flames. A man lay near them, dead, decomposing in the heat. Two young men came around a corner and walked apprehensively toward the scene. At the same time, two military medics, still in their scrubs, approached from the other direction. One carried a pistol in a shoulder holster.

“Get back!” a medic yelled at the men.

The two civilians kept coming. The unarmed medic reached over to his friend’s holster, wrenched the pistol from it, racked the chamber and aimed.

“Get back!” he yelled again, and the young men retreated.

When the medics had gone, they re-­emerged. One walked toward the flames. He was crying. Even from a distance, through the smoke, he could tell that the man lying by the fire was their father.

“I can’t,” he moaned, turning back toward his brother. His brother took him by the arm, and slowly they walked to the body. They laid a blanket on the ground and attempted to lift their father onto it. Trying to take an arm, a brother came away instead with a long strip of skin.

They finally wrapped up their father. A soldier joined them and took up a corner of the grim package. Together, they carried it home.

With the displaced pouring out of western Mosul, the Kurdish authorities at the Khazir camp began allowing Moslawis from the east side to go home. Among the returnees were Abu Omar and Abu Fahad and their families, or what was left of them.

On a morning a few weeks before they left the camp, Abu Omar asked Omar to fetch some water. Omar flew into a rage. Taking hold of a rock, he smashed his father in the head. As Amina screamed, and men rushed over to hold Omar back, Aya ran to the office where Kurdish agents worked. There she blurted out everything the family had tried to keep from their neighbors in the camp, and from me: Omar had, in fact, been in ISIS.

When I arrived, Abu Omar’s head was wrapped in a bandage. The gash had required stitches. Omar had been taken away. Abu Omar somberly apologized for hiding the truth from me. He was just trying to protect his son, he explained.

Aya was not somber. For once she wanted to talk. For years Omar had been violent, she said. It began at the orphanage. When the children returned home, Abu Omar took to beating his son and treating him like a half-wit. Abu Omar tried to silence her, but Aya kept talking. In the years before ISIS arrived, Omar had grown bigger and stronger, his anger uncontrollable. He began beating his father and sisters. When ISIS took Mosul, Omar grew enthralled with the group, thanks to the imam Abu Bakr and their cousin Loy, Abu Fahad’s son. One day Omar came home in a uniform, carrying a rifle. He disappeared for weeks at a time. He traveled to Syria, Aya believed. He threatened his father and sisters with death. “I’ll behead you right here in our home,” he would tell them. Aya and her father argued about how long Omar had been in ISIS. He claimed it was only two months. Aya insisted it was seven. “Why are you revealing your brother like this?” he said to her in a lowered voice, thinking I would not catch it.

“Do you know what you should do with a son like Omar?” Aya went on. “Kill him. Just kill him.”

When I went to see Abu Fahad in the camp afterward, I found him alone. Hamudi, Abu Fahad told me, had likewise been taken away by Kurdish intelligence agents. He had also joined the jihadists. Abu Fahad didn’t know how long Hamudi was with them or what exactly he’d done, but it was obvious who had helped Hamudi, a more thoughtful and cautious young man than Omar, overcome his doubts about the group: his older brother, Loy. Abu Fahad apologized, too. I told him I understood.

Loy had been with the Islamic State since long before it took Mosul. He had probably been with Al Qaeda before that. Loy was now fighting in western Mosul, against the Iraqi troops, Abu Fahad knew. They talked often by phone. Loy was certain he would die there.

“When we spoke last, he said, ‘Dad, you have to forget about me,’ ” Abu Fahad told me. “Maybe if the American troops capture him, he’ll have a chance. But not if the Iraqi troops do.”

On July 9, the Iraqi government declared victory in Mosul. The west side of the city lay in ruins. The comparisons to Aleppo, which had once seemed exaggerated, were now obvious. A Pentagon spokesman called Mosul “the most significant urban combat since World War II.” In late June, ISIS had blown up Al Nuri Grand Mosque. The centuries-­old minaret tumbled to the ground.

A few days after it came down, Abu Fahad was sent a video of Loy. He had been captured by the Iraqi federal police. In the video, Loy is shirtless, bloodied, filthy, his head shaved and beard chopped. His hands are tied behind his back, and he is sitting in the dirt, being questioned. Abu Fahad learned from a neighbor that shortly after the video was taken, his son was executed.

When I last saw Abu Fahad, he showed me a photo Loy had sent him by text message. It was of Abu Fahad’s 3-year-old granddaughter, Loy’s daughter, Zainab. She had spent most of her short life in the Islamic State. There was a good chance she would die in it. If she didn’t, she would grow up without her father, probably without her mother, probably in the midst of another war. She was so beautiful I couldn’t bear to look at her. I handed the phone back to him.