Igor Kossov

Special for USA TODAY

MOSUL, Iraq — The massive effort to drive the Islamic State from what had been Iraq's second-largest city is now being matched by an enormous challenge to bring an ancient metropolis back to life from near total ruin.

Much of the historic Old City in western Mosul has been reduced to rubble, with corpses rotting on the streets or buried under debris. Unexploded bombs and booby traps litter the terrain, as Islamic State guerrillas continue sniper attacks. And hundreds of thousands of former residents who fled remain in limbo.

Rebuilding after the nine-month offensive that ended in July will take years and billions of dollars, but the priority now is to make the city safe enough for residents to return. That means hunting down Islamic State stragglers, removing thousands of bodies and locating all the bombs that could still go off.

"It's very hard for us," said civil defense Col. Zacharia Ahmed Hassan, who heads a 19-man crew working 10 to 12 hours a day in 118-degree heat to recover bodies in western Mosul. "It's very hot, and we have to get up at 6:30. But we have to do our jobs."

Damage is far more extensive in western Mosul, where the prolonged fighting and airstrikes were more fierce. In contrast, reconstruction in Mosul's eastern half across the Tigris River has been ongoing since January. A large proportion of buildings there remained intact.

Six images tell story of Mosul's destruction

"Some facilities have been damaged, but electricity, water and markets have all come back" in eastern Mosul, said Saeed al-Jayashi, a spokesman for the Iraqi military, during a recent visit to Washington, D.C. "Even university students were back at school, defending their dissertations."

Hassan said his team works without body armor, making them easy targets for any remaining sleeper cells of the Islamic State, also known as ISIS.

Brig. Gen. Saad Maan, in a recent speech to the U.S. Defense Department, said ISIS fighters continue "to have attacks against civilians out of desperation," though they don't hold any territory any more.

Being around so much death takes a toll. Hassan said his most difficult moment was recovering the bodies of five of his relatives from a collapsed building a month ago.

"It's a bad memory," he said. "The youngest two of them were medical students."

Some of the remains belong to ISIS fighters, but a majority of the bodies are civilians. The team points out that those killed deserve proper burial, but the bodies also pose a public health risk of spreading potential disease if left on the ground.

Many civilians were shot in the streets by ISIS fighters while attempting to flee, although most were buried under collapsed buildings, largely as a result of airstrikes and other explosions, Hassan said.

More than a dozen civilians previously told USA TODAY they lost relatives in airstrikes by a U.S.-led coalition that leveled buildings with scores of people inside. ISIS often used civilians as "human shields" during fighting and airstrikes.

With so many bodies underneath rubble, extracting them requires much work, although the civil defense team has few vehicles and only basic shovels and pickaxes.

"Many of the civil defense tools were destroyed in the occupation and the fighting," Hassan said. "We don't have the tools we need to help us with the bodies. They sent us a team from Baghdad and some trucks, but they are damaged."

Some team members use their own trucks, and sometimes a private citizen will loan the crew a bulldozer.

The difficult task is further complicated by the presence of many anxious residents, begging the team to help identify their loved ones. "People come to us all the time, shouting and crying," Hassan said. "We understand them."

In one day, the team picks up 20 to 50 bodies, which are taken to the closest hospital for identification. While the work is challenging, there are pleasant surprises.

"Seven days ago, we found 23 people who were still alive. We took them from their graves, under the rubble, and took them to the hospital — men, women and children. They were very weak, hungry and sick, but alive," Hassan said.

The job is dangerous in another way — no protection from the myriad explosive devices. When an bomb is spotted, civil defense calls in the Federal Police's Emergency Response Division to dispose of it.

Most of the bombs are unexploded mortar and rocket-propelled grenades, as well as bombs — between 500 and 2,000 pounds — that were dropped from planes, according to the civil defense and Federal Police. Only a fraction are Improvised Explosive Devices or booby traps set up by ISIS.

Once the explosives are removed, they are handed to the Iraqi army for safe disposal.

"The situation in Mosul is dangerous, especially on the west side," said Col. Taha Zebari of the Emergency Response Division.

It's hard to know how many explosives remain after five months of intense fighting in western Mosul.

Zebari said that while his team has not had any losses from the explosives, the job is still difficult because of few funds.

"My team members are missing fuel and transportation," he said. "Only three members of the team are taking money from the government," with the rest contributing money out of their pockets for equipment.

Contributing: Oren Dorell from Washington, D.C.

Read more:

Iraqi forces have fully retaken Mosul, U.S.-backed coalition confirms

Fight against ISIS 'far from over' despite terrorist group's loss of Mosul