Iraqi forces have recaptured the last district held by Islamic State militants in the city of Fallujah.
The general commanding the operation declared the battle complete on Sunday (local time) after nearly five weeks of fighting.
Prime Minister Haider al-Abadi claimed victory over Islamic State in Fallujah more than a week ago but fighting continued inside the city west of Baghdad, including in the Golan district.
The offensive has been backed by a US-led coalition mostly in the form of air strikes against Islamic State.
"We announce from this place in central Golan district that it has been cleaned by the counter terrorism service and we convey the good news to the Iraqi people that the battle of Fallujah is over," Lieutenant General Abdul Wahab al-Saidi told state TV.
Flanked by jubilant fighters, some waving Iraqi flags, Mr Saidi said a few militants were still holding out in buildings.
At least 1800 Islamic State fighters were killed in the operation to retake Fallujah, and the rest had fled, he said.
Government troops launched the operation on May 23 to retake Fallujah, a bastion of the Sunni Muslim insurgency against US forces that toppled Saddam Hussein, a Sunni, in 2003, and later against Shi'ite-led governments.
Mr Abadi said last week that the recapture of Fallujah would pave the way for the military to march on Mosul, Islamic State's de facto capital.
Fighting to recapture the Iraqi city has forced more than 85,000 residents to flee to overwhelmed government-run camps.
The United Nations says it has received allegations of abuse of civilians fleeing the city, including by members of Shi'ite armed groups supporting the offensive.
The militants seized Fallujah in January 2014, six months before they declared a "caliphate" over part of Syria and Iraq.