With Mosul in ruins and nearly a million displaced, Iraq now faces the enormous task of restoring order and rebuilding its second city after driving out Islamic State group jihadists.
After eight months of gruelling fighting against IS, Iraqi forces are in control of Mosul.
But the famed Old City has been reduced to rubble and the iconic leaning minaret of its Al-Nuri mosque, the image of which adorns the 10,000 dinar note, lies in ruins.
The ancient, crowded alleys have become a silent maze of stone and iron skeletons, marked by mountains of rubble, craters and burned-out cars emitting a putrid odour of decaying bodies.
"The price of freedom is very high," said Omar Fadel, a municipality employee who returned a month ago to his neighbourhood of old Sinaaya, close to the ruins of the Al-Nuri mosque.
"We lost our houses, our money and above all, people, our loved ones."
Lise Grande, the United Nations' humanitarian coordinator for Iraq, told AFP that Mosul represents "the biggest stabilisation challenge the UN has ever faced -- the scale, the complexity, the scope of it."
Out of 54 residential quarters, "15 are destroyed, 23 moderately damaged, 16 lightly damaged," she said.
In eight months of combat, 948,000 people fled their houses, far beyond the UN's most pessimistic predictions of 750,000 displaced.
Like Fadel, some have already returned. But 320,000 are still living in camps and another 384,000 are staying with relatives or in mosques, living on humanitarian aid, according to the UN.
- 'Can't hold the area' -
Iraqi Prime Minister Haider al-Abadi declared the city "liberated" on July 9, but the threat of violence has not disappeared. An unknown number of jihadists mingled with the flood of civilians fleeing the fighting.
With few resources, "the local police can't, at this stage, hold the area," said Mohammed Ibrahim, a security official at the provincial council of Nineveh, of which Mosul is the capital.
The job of securing the city might be entrusted to a "joint force" made up of Iraq's counterterrorism service, the federal police and the army, which led the battle, a US advisor to the federal police said.
Authorities also set up a provincial intelligence centre, the first in Iraq, two months ago to "locate terrorist bases and sleeping cells, arrest and hand suspects over to the judiciary," Ibrahim said.
Meanwhile, workers have begun the laborious task of clearing the damage left by the fighting, revealing hundreds of civilians buried under the rubble.
The streets need to be cleared of explosive devices left by the jihadists.
Next begins the work of rebuilding. The UN says the first phase of "stabilisation" -- providing infrastructure, housing, education and a police force -- will cost at least $707 million (597 million euros).
"In the heavily damaged districts that are almost completely destroyed, we have to expect that this will take months, if not years," Grande said.
"The families who come from those districts -- we are talking about 230,000 to 240,000 families -- will probably not be able to go back to their homes for a very long time."
The UN has called for more international aid to help reconstruct the city, but less than half the aid needed for 2017 has been donated so far.
Mosul residents do not want to see rebuilding efforts confined to Iraq's government, which is seen as corrupt, sectarian and distant.
In Baghdad, "they think that all of Mosul is Daesh," said Issam Hassan, a young man in an east Mosul market, using an Arabic acronym for IS.
Political analyst Ziad al-Zinjari said he was "not optimistic" about Mosul's future.
"There are signs that the city will go back to square one, that the same mistakes will be repeated," he said.
Many fear that "corrupt people and thieves" will take over important posts, armed groups will emerge again and the authorities are "lagging behind in the reconstruction and resumption of public services," he added.
Despite the defeat suffered by IS, the groups that united to fight it could easily splinter as rivalries re-emerge.
Civil society activist Majed al-Husseini said that unless Mosul is declared a disaster zone and foreign organisations are involved in reconstruction, "political conflicts will bring back murders in the streets".
"Shiite militias are setting up in the city, which the Sunni majority sees as a provocation... the Kurds have their sights on the disputed areas (and) Sunni politicians have conflicts between them for personal interests," he said.
Years of rule by IS has also created divisions.
Some pro-government tribes are demanding "compensation" from other tribes who had pledged allegiance to the jihadists before they will allow them back into the city.
"The most important national priority is national reconciliation," Grande said.
But on both sides of the Tigris river dividing Mosul, residents say communal divisions are mainly a political creation.
"Ask around and see who hasn't got a Shiite or Christian friend. Everyone has," said Fadel.
"The city's architecture will never be the same again, but the spirit of Mosul, the solidarity of the inhabitants, will not change."