The senior US commander in Iraq has warned that the war against the so-called Islamic State (IS) is not over, despite a “historic” victory in Mosul.
Lt Gen Stephen Townsend told the BBC there were still IS fighters in Iraq.
He said the government should reach out to Iraq’s Sunni Muslim minority to stop IS from renewing itself.
“If we’re to keep… ISIS 2.0 from emerging, the Iraqi government is going to have to do something pretty significantly different,” he said.
“They’re going to have to reach out and reconcile with the Sunni population, and make them feel like their government in Baghdad represents them.”
Iraq’s Shia Muslim majority are regarded as heretics by IS, a Sunni Islamist group.
Iraq’s Prime Minister Haider al-Abadi has formally declared victory over IS in Mosul, after a nearly nine-month battle that left large areas in ruins, killed thousands of civilians and displaced more than 920,000 others.
Mr Abadi waved a national flag with troops after announcing the “collapse of the terrorist state of falsehood”.
In a report on Tuesday, Amnesty International said Iraqi and coalition forces had used unnecessarily powerful weapons in densely-populated areas.
IS fighters were also accused by Amnesty of committing serious abuses.
Commanders from the US-led coalition that has provided air and ground support to Iraqi forces said the urban combat had been most intense since World War Two.
Mr Abadi made the declaration of victory at the operations room of the Counter-Terrorism Service, whose elite forces were the first to enter Mosul in November.
Using a pejorative term for IS based on an Arabic acronym of its former name, he said: “I announce from here the end and the failure and the collapse of the terrorist state of falsehood and terrorism, which the terrorist Daesh announced from Mosul.”
US President Donald Trump sent his congratulations to his Iraqi counterpart, saying Mosul had been “liberated from its long nightmare under the rule of ISIS”.
“We mourn the thousands of Iraqis brutally killed by ISIS and the millions of Iraqis who suffered,” the president said in a statement, promising to seek the “total destruction” of the jihadists.
The US-led coalition confirmed that while areas of the Old City still had to be cleared of explosive devices and possible IS fighters in hiding, the Iraqi security forces had Mosul “firmly under their control”.
Mr Abadi had to delay declaring the “liberation” of Mosul on Sunday because a pocket of resistance remained in the Old City, on the western bank of the River Tigris, that was only about 180m (200 yards) long and 45m wide.
Iraqi army officers believed only a few dozen militants were left inside along with their wives and children, who they said were being used as human shields.
Gunfire and explosions were heard coming from the area earlier on Monday.
Mosul has been devastated by the battle, with the UN estimating that more than 5,000 buildings have been damaged and 490 destroyed in the Old City alone.
“It’s a relief to know that the military campaign in Mosul is ending,” said the UN Humanitarian Coordinator in Iraq, Lise Grande.
“The fighting may be over, but the humanitarian crisis is not. Many of the people who have fled have lost everything. They need shelter, food, health care, water, sanitation and emergency kits. The levels of trauma we are seeing are some of the highest anywhere. What people have experienced is nearly unimaginable.”
IS militants overran Mosul in June 2014, before seizing control of large parts of northern and western Iraq. The following month, Abu Bakr al-Baghdadi made his first and only public appearance as IS leader at the city’s Great Mosque of al-Nuri, and gave a speech proclaiming the creation of a “caliphate”.
IS blew up the mosque almost exactly three years later as Iraqi troops prepared to retake it – a move Iraq’s prime minister called a “formal declaration of defeat”.
IS still controls territory in three areas of Iraq – around Hawija, 130km (80 miles) south-east of Mosul, around Tal Afar, 65km west, and from Ana to Al-Qaim in the Euphrates river valley, 250km to the south-west.
It also holds a string of towns along the Euphrates in Syria, including Albu Kamal and Mayadin, but its stronghold of Raqqa is besieged by US-backed fighters.