A ceremony has been held in Basra to mark the official end of the six-year British military mission in Iraq.
UK combat operations ended as 20th Armoured Brigade took part in a flag-lowering ceremony with a US brigade.
In London, Prime Minister Gordon Brown said a new chapter in relations between the two countries had begun.
Earlier, a memorial service attended by Defence Secretary John Hutton took place in Basra for the 179 UK personnel who have died during the conflict.
The focus was a memorial wall featuring the names of the 234 UK and foreign troops and civilians who lost their lives under British command in Iraq.
I think when the history is written of this campaign, they will say of the British military: 'We did a superb job'
John Hutton
Defence Secretary
In pictures: British withdrawal
The end of combat operations came a month ahead of schedule.
Mr Brown, who held talks with Iraqi counterpart Nouri Maliki at Downing Street, said: "Today Iraq is a success story. We owe much of that to the efforts of British troops. Our mission has not always been an easy one, many have said that we would fail.
"Britain can be proud of our legacy that we leave there."
Mr Maliki said: "There are people in Iraq who want the government to fail but our army and armed forces are ready to face these challenges."
'Ultimate sacrifice'
The names of those who died during the UK's Operation Telic were read out at the memorial service, and included Italian, Dutch, Danish, American and Romanian troops.
The last post was sounded by a bugler and prayers were said. There was also a roar overhead as a Tornado aircraft conducted a fly-past in tribute.
Gordon Brown: 'Today Iraq is a success story'
Lt Col Edward Chamberlain, commanding officer of Iraq-based battalion 5 Rifles, said: "We've been slowly working, as part of a coalition together over the six years, to achieve an end-state which is an Iraq which is secure, happy, at peace with itself and its neighbours.
"We're slowly but surely transitioning towards that."
Mr Hutton said the UK should be proud of what its troops had achieved.
"It's been a long and hard campaign. There's been no question about that, and we've paid a very high price," he said.
"But I think when the history is written of this campaign, they will say of the British military: 'We did a superb job.'"
Shadow defence secretary Dr Liam Fox said that while Army personnel were leaving Iraq, "the Royal Navy is still active there and we must remember the strong presence they still have in the Gulf".
Inquiry call
Opposition leader David Cameron has called for an immediate full inquiry into the Iraq war, similar to the one carried out by the Franks Committee into the Falklands conflict.
UK CASUALTIES IN IRAQ
Full details on every casualty
He said: "After years of foot-dragging, I believe it is the time for the government to announce a proper Franks-style inquiry. Instead of starting in many months' time, it should start right now.
"There are vital lessons to learn and we need to learn them rapidly and the only justification for delay can, I'm afraid, be a political one."
British forces began their official pull-out last month when the UK's commander in the south of the country, Maj Gen Andy Salmon, handed over to a US general.
The civilian death toll in Basra as a result of the conflict is estimated at between 3,302 and 3,766, according to data from the Iraq Body Count.
Asked about the UK presence in Iraq, the country's president, Jalal Talabani, told BBC News that the mission had been one of liberation.
FROM THE BBC WORLD SERVICE
More from BBC World Service
"In the past the British forces came to occupy against the will of the Iraqi people," he said.
"This time they came here to liberate Iraqi people from the worst kind of dictatorship."
But the UK Stop the War Coalition said the operation had been an "unmitigated disaster", and the tragedy of British military deaths had been made more acute by the "pointlessness" of their presence.
A spokesman added: "The British soldiers will leave Basra in a much worse condition than they found it, its population depleted and demoralised, its infrastructure devastated."
BBC News defence correspondent Caroline Wyatt says there is a sense of relief for many British servicemen and women that their final tour of Iraq was ending.
Some were serving on their fourth tour, taking them away from home for two years out of the last six.
But the BBC's John Simpson said many ordinary Iraqis in Basra were worried that the Americans who will replace them will be much more aggressive.