Two British servicemen, dressed in civilian clothes, were held at Basra's main police station after the incident. Outside, rioting began as the city threatened to descend into anarchy.
Last night, British forces used up to 10 tanks - supported by helicopters - to smash through the walls of the jail and free the two British servicemen. John Reid, the Defence Secretary, later confirmed they were back with UK forces.
Around 150 prisoners were said to have escaped during the assault, which was condemned as "barbaric, savage and irresponsible" by Mohammed al-Waili, the provincial governor. But the Ministry of Defence disputed the claim, saying that the release of the soldiers had been "negotiated".
British troops had surrounded the police station after the soldiers, alleged to be undercover commandos, had been arrested for failing to stop at an Iraqi police checkpoint, according to one report. Within minutes an angry crowd gathered and troops had to flee from blazing Warrior vehicles when the mob threw petrol bombs. A soldier could be seen scrambling for his life from a burning vehicle. The MoD said three British soldiers were injured.
The anarchy that the arrests provoked provided the most graphic example yet that the British-patrolled southern sector of Iraq is descending into turmoil after a period of relative calm. Two Iraqis were said to have died in the violence and 15 were injured.
A senior army official denied that the situation was chaotic, insisting that yesterday's events were just a "bump in the road". But the images of street warfare prompted senior politicians to renew pressure on Tony Blair to pull British troops out of Iraq.
The Liberal Democrat foreign affairs spokesman, Sir Menzies Campbell, said: "If these events reflect a breakdown in the relationship between the civilian authorities and the British military, then they are very worrying indeed. These events underline the need for a coherent exit strategy of British forces from Iraq."
Military insiders said that the rioting had nothing to do with the two servicemen but was fuelled by the arrests by British forces of members of the Army of Mehdi, the insurgent force headed by the radical Shia cleric Muqtadaal-Sadr, after the recent attacks on British forces. The arrested men included Sheikh Ahmad Majid al-Fartusi, the Basra area commander, and his aide Sajjat al-Basri. Some 200 members of the group staged a show of force on Sunday, blocking roads in the city centre and demanding their release.
British forces have refused to release the detainees, insisting that the Iraqi police service had been prevented from bringing them to justice by "people who clearly oppose law and order".
The local police force has long been rumoured to have been infiltrated by members of the militia. There have been repeated protests in Basra over the past few weeks against the British presence, but one official admitted: "We have seen nothing on this scale."
A senior military figure said: "We need to keep a sense of perspective. There has been an increased attempt by them to disturb things ahead of [the constitutional referendum on] 15 October. Where is the surprise in that? We have responded by arresting some of their people.
"There has been a bit of a backlash, which we are more than capable of handling. Basra is not descending into chaos. Five, six or 10 petrol bombs does not a crisis make. It is just a road bump."
Mr Blair, who spent last night at Chequers, was kept informed about events. There are growing concerns within the Government that Britain is being sucked into its own Vietnam.
Calling for Mr Blair to set an exit date, Labour MPs said the scenes from Basra had echoes of the killing of two British soldiers who were murdered by a mob in Northern Ireland during the Troubles after driving into a republican funeral cortège in March 1988.
Clare Short, the former international development secretary, who resigned over the war, said: "We should negotiate an end to the occupation. They are all saying 'no' because it's such a mess we cannot leave now. But the occupation is the major problem now.
But Mr Reid said: "We remain committed to helping the Iraqi government for as long as they judge that a coalition presence is necessary to provide security. The situation in Basra is calmer after a day of disturbances. At this stage it is not possible to be certain why these disturbances began. Many of those present were clearly prepared well in advance to cause trouble."
Asked about how the men were freed, an MoD spokesman said: "We have not had confirmation of the full details of this."