July 10 (UPI) -- Mosul has been totally liberated from control by the Islamic State, Iraq's prime minister declared Monday.
"From here, from the heart of the liberated and free Mosul, by the sacrifices of the Iraqis from all the provinces, we declare the great victory for all of Iraq and Iraqis," Haider al-Abadi announced in Mosul. "This is a great celebration that crowned the victories of the fighters and the Iraqis over the last three years."
Abadi waved a national flag with troops after announcing the "collapse of the terrorist state of falsehood" at the operations room of the Counter-Terrorism Service, whose elite forces were the first to enter Mosul in November.
The U.S.-led coalition fighting the Islamic State -- called Combined Joint Task Force Operation Inherent Resolve -- congratulated Iraqi security forces "on their remarkable progress against ISIS while making extraordinary efforts to safeguard civilian lives."
The coalition confirmed that the Old City still had to be cleared of explosive devices and possible Islamic State fighters in hiding but Iraqi security forces had Mosul "firmly under their control".
The battle for Mosul, the second-largest city in Iraq, has taken almost nine months as thousands of civilians died and more than 920,000 others were displaced.
U.S.-led airstrikes helped the coalition take over Mosul.
But officials warned of other challenges in Iraq.
"Make no mistake; this victory alone does not eliminate [Islamic State] and there is still a tough fight ahead," said Lt. Gen. Stephen Townsend, the senior American commander in Iraq. "But the loss of one of its twin capitals and a jewel of their so-called caliphate is a decisive blow."
Mosul's historic Old City has been nearly reduced to rubble, including the ruins of the Al-Nuri Mosque blown up by the Islamic State last month. The United Nations estimates that more than 5,000 buildings have been damaged and 490 destroyed in the Old City alone.
And few citizens remain in the area.
CNN reported that in some parts of Mosul, residents have begun to return from displacement camps to think about rebuilding.
"The first challenge facing the Iraqi government and international organizations is to provide basic necessities of life for more than 400,000 Iraqis who have been displaced from the western part of Mosul, which mostly lies in ruins," Fawaz Gerges, a Middle East expert at the London School of Economics and Political Science told CNN.
He estimated that rebuilding the Old City alone would cost $1 billion.