WASHINGTON, United States
The exit of the remaining UK military personnel - around 100 - from Irbil, in the northern Kurdistan region, was co-ordinated over recent weeks with US forces, who also departed on Wednesday.
It follows an agreement between the US and the Iraqi government, signed two years ago, to withdraw foreign troops by the end of this month.
British and US forces have been present in Iraq since 2014, as part of the international coalition to help defeat the extremist Islamic State (IS) group. Their departure brings the mission, known as Operation Inherent Resolve, to an end.
Iraqi Prime Minister Ali al-Zaidi said the end of the coalition's mission marked "Iraq's transition to a phase in which it assumes full responsibility for its security and stability".
Iraq is set to hold four "Sovereignty Days" as a national holiday to mark the withdrawal.
"Following more than a decade of operations, training and capacity building, Iraqi Security Forces (ISF) and the Kurdish Peshmerga have secured the enduring territorial defeat of Daesh in Iraq and are now well placed to take primary responsibility for the country's security," the UK Ministry of Defence (MoD) said in a statement, referring to IS by an Arabic acronym.
"With these objectives achieved, Iraq and its international partners can begin a new chapter focused on enduring security co-operation under Iraqi leadership."
US President Donald Trump celebrated the withdrawal, calling it a "victory for the United States, a victory for Iraq, and a decisive victory over ISIS".
Writing in a Truth Social post, the president added: "It has been a long time, with very bad decision-making that got us involved in this quagmire in the first place, but soon, that will be part of History."
Pentagon spokesman Sean Parnell also said the coalition's departure from Irbil marked "the successful conclusion of the military mission that defeated [IS] in Iraq".
He added: "The primary responsibility for addressing Iraq's remaining security challenges, including [IS] remnants and Iran-aligned militias that undermine Iraqi sovereignty and regional stability, now rests with the government of Iraq."
The Iraqi government declared the military defeat of IS in 2017, but coalition forces remained to help prevent the group's resurgence.
A recent UN report assessed that sustained counter-terrorism pressure by Iraqi security forces had left IS with several hundred fighters who were "able to carry out unsophisticated operations only".
The Iraqi government also faces the challenge of Iranian-backed militias in the country.
Zaidi, who took office in May, has vowed to disarm them and bring all weapons under state control following the coalition's exit.
But several powerful factions have resisted his plans and could now see their influence grow without the US presence.
Since the start of the US and Israel's war with Iran earlier this year, militias have been targeting the remaining US and UK forces stationed at Irbil air base.
Hundreds of Nato troops stationed in Baghdad left the country in March as tensions rose.