He added: "There were no major incidents during the operation and all troops were back at the continuing operating base by midday today Iraqi time."

The MoD said UK forces would now operate from their base at Basra Air Station and "retain security responsibility" for Basra until the full handover. The military will continue to train Iraqi troops.

Foreign Secretary David Miliband said: "Our decisions in Basra reflect the situation on the ground, above all the growing capacity of the Iraqi security forces, and are signed off by the coalition and the Iraqi government."

The head of Iraqi security forces in Basra province, General Mohan Tahir, gave details of the withdrawal at his first news conference in the city.

He said Iraqi troops were now in control of Basra Palace.

'Highly symbolic'

BBC correspondent Richard Galpin in Baghdad said this was a "highly symbolic moment, marking the end of Britain's physical military presence in any Iraqi city".

The Iraqi flag was raised during the handover by UK troops

Over the past year British forces have handed over control of three Iraqi southern provinces, with only Basra province remaining under their control.

The security situation in the city will be watched closely, as there are concerns rival Shia factions could vie for control.

Former Foreign Office official Rory Stewart, who served as deputy governor of two southern Iraqi provinces from 2003 to 2004, told the BBC's Have Your Say programme that "we simply do not have any control over southern Iraq and that has been the situation in my mind for about two-and-a-half years now".

'Necessary step'

The Liberal Democrat leader, Sir Menzies Campbell, told BBC News 24 he thought the pull-out marked the end of British troops' role in Iraq.

I see this as a necessary step towards what I believe to be the withdrawal which would be in the interests of British forces