The Islamic State group's former Syrian stronghold Raqa has been captured, but it lies ruined, littered with explosives, and lacking electricity or running water for residents desperate to return.
Aid groups and the United Nations say clearing and rebuilding what was once the jihadist group's de facto Syrian capital will be a massive, expensive effort, and it could be months before life resumes.
Four months of fierce fighting including heavy US-led coalition air strikes has collapsed multi-storey buildings and left others torn apart by heavy artillery and gunfire.
The United Nations estimated in September that up to 80 percent of the city could be uninhabitable, and Raqa's basic infrastructure is now virtually non-existent.
"In the previous months, local sources reported... a severe shortage of food, medicine, electricity, safe drinking water and basic commodities," said Linda Tom, spokeswoman for the UN Office for the Coordination of Humanitarian Affairs.
"The presence of water-borne diseases and of unburied corpses were also reported, posing a grave public health risk," she told AFP.
Running water has been out for months, and just a few water boreholes remained in use before the last phase of the battle for the city.
There is no electricity supply at all, with the grid damaged by fighting and the generators that had provided two hours of power a day out of fuel.
There are also no functioning medical facilities in the city, and schools have long since closed, non-governmental organisations say.
"Substantial investment will be required to reconstruct the city's destroyed homes, health facilities and schools, and to remove unexploded mines, before people can safely go home," said aid group Save the Children.
"The military offensive in Raqa may be coming to an end, but the humanitarian crisis is greater than ever," the group's Syria director Sonia Khush said in a statement.
'It'll take some time'
Before Syria's conflict erupted in March 2011, some 220,000 people lived in Raqa, a population that swelled in the early years of the war as people displaced from elsewhere settled there.
But the city has been gradually emptied of its population, with some fleeing during IS rule and others escaping as the attacking Syrian Democratic Forces battled to capture the city.
Around 270,000 people have been displaced by the fight for Raqa, but they will be unable to return until the city is cleared of explosives, which IS has regularly laid across territory under its control.
Residents have already been warned against attempting to enter the city for now, and permanent returns are not expected for the next month at least, as clear-up operations continue.
The daunting task of transforming Raqa into a liveable city again falls to the Raqa Civil Council, a body of local officials formed six months ago.
They have divided the city into zones and plan to work their way in from its outskirts.
"We can't do anything else before getting rid of the mines," RCC member Ibrahim al-Hassan told AFP ahead of the city's capture.
"The second phase is restoring the water and electricity networks. After all that, we can turn to the schools. These are the essential priorities."
The process will be costly.
The European Union has pledged $3.5 million (three million euros) for de-mining efforts, the RCC says, and Washington and the US-led coalition against IS have pledged some assistance with short-term, "quick-impact" projects.
Aid workers said meetings between donors, local officials and non-governmental organisations were ongoing, but the final price-tag for reconstruction has yet to be assessed, and it remains unclear who will pick up the bulk of the bill.
"We fear that once the military operation is over, the attention of the international community moves on," said Arnaud Quemin, interim Syria director of the Mercy Corps non-governmental organisation.
"In essence, the end of the battle is the most acute moment of the crisis, and it'll take some time before we can observe any improvement."