Iraqi forces on Friday captured the border town of Rawa, the last remaining town under Islamic State (IS) militants’ control, signalling the collapse of the group's self-proclaimed caliphate.
Rawa's capture marks the end of IS era of territorial rule over a so-called caliphate that it proclaimed in 2014 across vast swathes of Iraq and Syria.
Iraqi forces "liberated Rawa entirely, and raised the Iraqi flag over its buildings," Lieutenant General Abdul Ameer Rasheed Yarallah said in a statement from the Joint Operations Command.
Syria's army has also declared victory against IS, but last week militants re-infiltrated Albu Kamal, near the border from Iraq, and are still fighting there, as well as in some villages and desert areas nearby.
All the forces fighting IS in both countries expect a new phase of guerrilla warfare, a tactic the militants have already shown themselves capable of.
Prime Minister Haider al-Abadi congratulated Iraq's armed forces and people, saying Rawa was retaken in record time.
"Liberation of Rawa district in mere hours reflects the great strength and power of our heroic armed forces and the successful planning for battles," he said in a statement.
A video issued by the military showed Iraqi forces sending a message to Rawa's residents via radio which said: "Daesh has ended for good, and now the age of Iraq begins," referring to the Sunni militant group by an Arabic acronym.
Another showed a convoy of military vehicles sporting Iraqi flags and blasting out the national anthem. State television played patriotic songs and aired footage of troops in Rawa.
"With the liberation of Rawa we can say all the areas in which Daesh is present have been liberated," a military spokesman said.
Iraqi forces will now focus on routing the militants who fled into the desert and exert control over Iraq's borders, the spokesman said.
Rawa borders Syria, whose army seized the last substantial town on the border with Iraq, Albu Kamal.
Albu Kamal shares a border crossing with al-Qaim in Iraq. The militants lost control of the border crossing earlier this month, dealing a critical blow to the organisation, which had long relied on the route to move its fighters and equipment.
The group's leader, Abu Bakr al-Baghdadi, is believed to be hiding in the stretch of desert which runs along the border of both countries.
Driven this year from its two de facto capitals -- Iraq's Mosul and Syria's Raqqa -- IS was progressively squeezed into an ever-shrinking pocket of desert, straddling the frontier between the two countries, by enemies that include most regional states and global powers.
In Iraq, IS faced the army and the Shi'ite paramilitary groups, backed both by the U.S.-led international coalition and by Iran.
Iraq has been carrying out its final campaign to crush the IS caliphate while also mounting a military offensive in the north against the Kurds who held an independence referendum in September.
However, the defeat of IS does not mean civilians are now safe, the International Rescue Committee said. Nearly 3.2 million people are unable or unwilling to return home after years of displacement and over 11 million are in need of vital humanitarian assistance, it said.
"Today marks a historic day for the people of Iraq. It is, however, vital that the international community does not view the end of (IS) territorial control as the end of their responsibility to the Iraqi people who have endured years of conflict and face a long, difficult recovery," the group's Iraq Country Director Wendy Taeuber said in a statement.