The UK's military operation in Iraq officially ended at midnight, the Ministry of Defence has confirmed.
It came after the Royal Navy completed its training of Iraqi sailors, with the last personnel leaving the country on Friday.
While Operation Telic, the name for the UK mission in Iraq since 2003, ended, a handful of staff will remain at the British embassy in Baghdad.
At its peak the operation involved some 46,000 personnel.
Most UK forces withdrew in July 2009 from Basra, their main base, but 81 Navy trainers remained at the port of Umm Qasr and there were three UK personnel based in Baghdad.
The completion of the mission on Sunday comes eight years after Britain became involved in invading Iraq to remove Saddam Hussein.
Defence Secretary Liam Fox paid tribute to the 179 British personnel who died since 2003 "fighting for security and stability in Iraq".
A total of 1,800 Iraqi personnel were trained on 50 different courses, including maritime, small arms, oil platform defence, and maintenance training, the Ministry of Defence said.
Britain is still involved in Nato's training mission in Iraq, with 44 UK military personnel still in the country.
Members of Iraqi Security Forces will continue to be trained at UK-based courses, such as the Royal Military Academy Sandhurst.
Defence Secretary Liam Fox said: "Royal Navy personnel have used their formidable skills and expertise to bring about a transformation in Iraq's naval force.
"The Iraqi navy has a key role to play in protecting Iraq's territorial waters and the oil infrastructure that is so vital to Iraq's economy, and I am proud of the role British forces have played in making it capable of doing that job."
'List of negatives'
Brigadier Tim Chicken, director of the Iraq training mission, said the naval training had been conducted "out of the limelight" but had achieved "significant results".
"We have led the development of the Iraqi navy, seeing its growth from the most rudimentary of capability into one that stands at the cusp of taking complete responsibility for its territorial waters and critical offshore oil infrastructure," he said.
But Labour MP David Miliband, who was foreign secretary between June 2007 and May 2010, criticised the allied operation to rebuild Iraq.
"While there have been gains, the list of negatives has been long - longer than the list of gains," he told the BBC's Andrew Marr Show.
"I am afraid the failure of the Western forces to develop a proper strategy for peace, not a strategy for war, has held back the country.
"It is still to play for, despite the loss of blood and treasure, but I think that is the key lesson."