Iraq has announced that its war against so-called Islamic State is over.
Prime Minister Haider al-Abadi told a conference in Baghdad that Iraqi troops were now in complete control of the Iraqi-Syrian border.
The border zone contained the last few areas IS held, following its loss of the town of Rawa in November.
The Iraqi announcement comes two days after the Russian military declared it had accomplished its mission of defeating IS in neighbouring Syria.
The jihadist group had seized large swathes of Syria and Iraq in 2014, when it proclaimed a "caliphate" and imposed its rule over some 10 million people.
But it suffered a series of defeats over the past two years, losing Iraq's second city of Mosul this July and its de facto capital of Raqqa in northern Syria last month.
Some IS fighters are reported to have dispersed into the Syrian countryside, while others are believed to have escaped across the Turkish border.
A battle unfinished
By Sebastian Usher, BBC Arab affairs editor
This is undeniably a proud moment for Mr Abadi. Since the recapture of Mosul – the militants' main stronghold – the offensive against the jihadists has moved swiftly on both sides of the border.
But if the direct military war with IS is genuinely over, and Iraq's elite forces can now step back after a conflict that's taken a huge toll on them, it doesn't mean the battle against the group's ideology or its ability to stage an insurgency is finished – whether in Iraq and Syria or the wider world.
Mr Abadi said on Saturday: "Our forces are in complete control of the Iraqi-Syrian border and I therefore announce the end of the war against Daesh [IS].
"Our enemy wanted to kill our civilisation, but we have won through our unity and our determination. We have triumphed in little time."
The Iraqi armed forces issued a statement saying Iraq had been "totally liberated" from IS.
Interactive Slide the button to see how the area IS controls has changed since 2015
Last month, the Syrian military said it had "fully liberated" the eastern border town of Albu Kamal, IS's last urban stronghold in that country.
On Thursday, the head of the Russian general staff's operations, Col-Gen Sergei Rudskoi, said: "The mission to defeat bandit units of the Islamic State terrorist organisation on the territory of Syria, carried out by the armed forces of the Russian Federation, has been accomplished."
He said Russia's military presence in Syria would now concentrate on preserving ceasefires and restoring peace.
The collapse of IS has raised fears that its foreign fighters will escape over Syria's borders to carry out more attacks abroad.