The battle was long and bloody, punctuated by wrenching moments of human tragedy.
Los Angeles Times staff photographer Carolyn Cole covered the exodus of Iraqis from in and around Mosul in the days leading up to the nine-month struggle to oust
Times staff photographer Marcus Yam arrived in Mosul in the spring, when the city’s western sector was more or less free of the extremist group, but still a perilous and unpredictable environment. He spent time with a team of dedicated bomb defusers as they went about the dangerous task of clearing explosives from the city. He also covered the harrowing aftermath of coalition airstrikes, which left hundreds dead and wounded.
And Yam produced moving photographs of the cleanup and restoration of the University of Mosul, a former stronghold of Islamic State whose ongoing reclamation marks an important symbolic milestone for a shattered and sorrowing city.
Iraqi families flee Mosul, where government forces and their allies were battling Islamic State in November. More than 1 million people were thought to be trapped in the city.
An Iraqi special forces soldier makes his way to a roof in Mosul. The various groups battling Islamic State are united by a common enemy for now, but they have very different ideas about what should happen after the militants are gone.
Displaced Iraqis arrive in a dump truck at Hassan Sham, a United Nations refugee camp east of Mosul.
Sada Muslat, 71, greets her son Waeed Ahmed Hussein, whom she had not seen in nearly three years, at the Hassan Sham camp.
At an army clinic, set up in a home abandoned first by its owners, then by Islamic State, Capt. Osama Fuad Rauf, center, and Maj. Mohammed Hassan Abdullah treat a soldier injured in fighting near Mosul.
Omar Ahmed, a 21-year-old native of east Mosul, said he was a reluctant militant. "In the beginning, I refused the idea. I refused them," he said. But once Islamic State came to power, he said he had no choice. He was sent to fight, first in neighboring Syria, then in Mosul.
The body of a man said to be an Islamic State fighter lies in a street in Mosul. Iraqi troops' treatment of suspected militants has raised some concerns.
Men get their identification cards back after police checked them at a displaced persons camp south of Mosul.
Giving a warning sign, Wissam Daoud prepares to safely detonate unexploded ordnance in front of a shop in west Mosul. He has tracked the evolution of the militants' explosives through half a dozen offensives, and he can identify them at a glance.
Wissam Daoud, left, views the spot where his friend Amir Abdul Mahdi was shot by a sniper in west Mosul.
A body is removed from the rubble of a home in the Jadidah neighborhood of Mosul. A March 17 airstrike is believed to have caused the deaths of more than 270 civilians.
A man grieves over a body bag that held the remains of a pregnant woman found in the rubble of a home in Mosul's Jadidah neighborhood after the March 17 airstrike.
Turkya Azudin watches recovery teams at work. She said she lost 18 relatives in the March 17 airstrike.
Ali Thanoon was buried under concrete for five days after the March 17 airstrike. He was treated at a hospital in Irbil.
Jasim Mohammed Ali, left, says an airstrike on Nov. 17 destroyed his family's east Mosul home, killing his son and six grandsons.
Mohammed Kamal Mahmoud stops to greet a friend as he bikes through Mosul in March.
Sura Hussein Abdulmaged is one of hundreds of young Iraqi volunteers working to clean up the University of Mosul, a former outpost of Islamic State, in April.
Volunteers clear debris from a university building. Militants looted the campus for anything valuable: ancient manuscripts, rare books, computers and cash.