After three harrowing years of occupation under the Islamic State, Mosul has been liberated. But the Iraqi city, once home to 2.5 million people, is a ghostly shell of its former self.

Damaged buildings in the Old City of Mosul, Iraq. | (AP Photo/Felipe Dana)

Over the course of the three-year occupation, ISIS turned the city into a fortress, rigging houses and roads with explosives, using hospitals and schools as military bases, and wielding citizens as human shields.

In October 2016, the offensive to take back the city began. In the final three weeks, the Old City was pummeled by airstrikes and overrun by heavy-artillery ground combat to root out militants.

Finally, in July of this year, Iraqi Prime Minister Haider al-Abadi declared victory. But the violent nine-month battle did untold amounts of damage, displacing nearly a million people, and killing thousands more.

Now, with military protection, families are slowly returning to newly reclaimed areas, only to find an unrecognizable pile of rubble where their city used to be.

(AP Photo/Felipe Dana)

Nearly a third of the Old City is damaged or destroyed, and a large majority of western Mosul has been reduced to rubble, with bodies still buried underneath.

"Thousands of Mosul families have been left without a home," The Associated Press reports. "Schools have been leveled, utility grids wrecked, highways pounded into broken dirt roads."

As of July, about 90 percent of the 176,000 east Mosul residents who left have since returned — compared to fewer than one tenth of the 730,000 people displaced from the west.

"Many of the people who have fled have lost everything. They need shelter, food, health care, water, sanitation, and emergency kits," a United Nations representative told UPI. "The levels of trauma we are seeing are some of the highest anywhere. What people have experienced is nearly unimaginable. ... The fighting may be over, but the humanitarian crisis is not."

A 9-year-old boy plays on his street. | (AP Photo/Felipe Dana)

The prime minister has promised the rebuilding process will begin soon, but the national government lacks funds for even basic daily operations due to low oil prices. Moreover, security forces continue to clear homes and roads of explosive devices and hunt for ISIS militants hiding in pockets throughout the city.

"The city's renaissance could take a generation, if it happens at all," Reuters reports.

In July, Associated Press photographer Felipe Dana visited Mosul to document the scene as locals slowly trickled back into what's left of their city. Below, have a look at the devastated remains of the once-vibrant Iraqi metropolis:

(AP Photo/Felipe Dana)

(AP Photo/Felipe Dana)

Mosul's main hospital. | (AP Photo/Felipe Dana)

(AP Photo/Felipe Dana)

(AP Photo/Felipe Dana)

A family stands on the roof of what was once their house. | (AP Photo/Felipe Dana)

Fleeing Iraqi civilians walk past the heavily damaged al-Nuri mosque. | (AP Photo/Felipe Dana)

(AP Photo/Felipe Dana)