But the cost of rolling back ISIS in Iraq has been staggering. Swaths of major cities like Mosul and Fallujah lie in ruins. Tens of thousands of Iraqis have been killed and wounded, and minority groups, such as Yazidis and Christians, have faced outright genocide. Although Mosul has returned to the control of the central government, cities like Tal Afar and Hawija remain under ISIS. Meanwhile, hundreds of thousands of Iraqis are stranded in refugee camps around the country, awaiting an uncertain future.

“I announce from here the end and the failure and the collapse of the terrorist state of falsehood and terrorism,” al-Abadi said in a speech on Monday.

This week, three years after Islamic State militants seized Mosul, Iraqi Prime Minister Haider al-Abadi entered the city to announce its liberation, declaring victory in the nine-month siege even as fighting continued in the last pockets of ISIS-controlled territory.

Ordinary Iraqis today feel “everything from elation to despair,” Yar said. “Many people are simply happy to be freed of ISIS, while others who have lost their homes or lost their families are asking, what is left for their lives after this?”

Cengiz Yar, an American photojournalist based in Iraq, has compiled a visual record of this harrowing period of Iraqi history, covering the military operations to retake Mosul, the impact of the war on civilians, and the resilience of Iraqis despite years of bloodshed and totalitarian rule. “I’ve watched people run across sniper alleys [toward government-controlled areas] to escape from ISIS,” Yar said. “When they made it across, they’d be greeted by the soldiers and would hug and kiss them. Thanking them for coming to save them.”

The coalition fighting ISIS is made up largely of Iraqi Special Forces, the Iraqi Army, the Federal Police, and the Emergency Response Unit, with the United States and other coalition partners providing air support. Thousands of people have been killed or wounded in what U.S. commanders have described as “the deadliest urban combat since World War II.”

“Iraqi forces have paid a heavy price — every guy I’ve talked to has lost either friends or family members, and many of them have been injured in combat three or four times,” said Yar. “Over so much time fighting, many of these guys have been wounded, patched up, and went back into the fighting as soon as they could.”

The war with ISIS is the latest chapter in a series of conflicts that has torn apart Iraqi society, from the Iran-Iraq War in the 1980s to the Gulf War to the U.S. invasion in 2003. The almost unbroken fighting has caused deep pessimism.

“Iraqi soldiers I’ve spoken with have told me that they believe this conflict is never going to end and that Iraq is never going to be stable,” Yar said. “After ISIS is defeated, many people believe there will be something like an ‘ISIS 2.’ There will always be something.”

Dispelling these fatalistic sentiments will be a task for Iraq’s leaders and the international community. If they don’t provide security and a sense of hope for the many Iraqis who have lost their homes, families, and livelihoods, a new round of civil conflict feels inevitable.

“A lot of people in refugee camps just have no idea when they will be able go home, and they don’t trust that there’ll be security for their families if they do,” said Yar. “Much of the reason that this war happened in the first place was lack of trust in the government, and the ability of [ISIS] cells to exploit that situation using gang-like tactics to force control over territory.”

“It’s possible that something like this could happen again in the future,” he added, “if this isn’t handled right.”