Prime Minister Haider al-Abadi says Iraqi forces have driven the last remnants of Islamic State from the country, three years after the militant group captured about a third of Iraq's territory.
The Iraqi forces recaptured the last areas still under IS control along the border with Syria, state television quoted Abadi as telling an Arab media conference in Baghdad on Saturday.
"Commander-in-Chief @HaiderAlAbadi announces that Iraq's armed forces have secured the western desert & the entire Iraq Syria border, says this marks the end of the war against Daesh terrorists who have been completely defeated and evicted from Iraq," the federal government's official account tweeted.
In a separate tweet later, Abadi said: "Our heroic armed forces have now secured the entire length of the Iraq-Syria border. We defeated Daesh through our unity and sacrifice for the nation. Long live Iraq and its people."
The US-led coalition that has been supporting Iraqi force against Islamic State tweeted its congratulations.
Last month Iraqi forces captured Rawa, the last remaining town under Islamic State control, near the Syrian border.
Mosul, the group's de facto capital in Iraq, fell in July after a gruelling nine-month campaign backed by a US-led coalition that saw much of the northern Iraqi city destroyed.
Islamic State's Syrian capital Raqqa also fell to a US-backed Kurdish-led coalition in September.
The forces fighting Islamic State in both countries now expect a new phase of guerilla warfare, a tactic the militants have already shown themselves capable of.
Islamic State leader Abu Bakr al-Baghdadi, who in 2014 had declared in Mosul the founding of a new Islamic caliphate, released an audio recording on September 28 that indicated he was alive, after several reports he had been killed. He urged his followers to keep up the fight despite setbacks.
He is believed to be hiding in the stretch of desert in the border area.