Iraqi Prime Minister Haider al-Abadi has said that Iraqi forces have driven the last remnants of so-called Islamic State from the country, three years after the militant group captured around a third of Iraq's territory.
Iraqi forces recaptured the last areas still under IS control along the border with Syria, state television quoted Mr Abadi as telling an Arab media conference in Baghdad.
"Commander-in-Chief Haider Al-Abadi 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, Mr 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 United States hailed the end of the "vile occupation" of Iraq.
"The Iraqi announcement signals the last remnants of ISIS's self-proclaimed 'caliphate' in Iraq have been erased and the people living in those areas have been freed from ISIS's brutal control," US State Department spokeswoman Heather Nauert said.
"The United States joins the government of Iraq in stressing that Iraq's liberation does not mean the fight against terrorism, and even against ISIS, in Iraq is over," Ms Nauert added in a statement
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 guerrilla 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 28 September 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.
Driven from its two de facto capitals, Islamic State was progressively squeezed this year 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, the group confronted US-backed Iraqi government forces and Iranian-trained paramilitary groups known as Popular Mobilisation.