The fighting began with operations against militias in Basra
As Iraqi Shia cleric Moqtada al-Sadr orders his Mehdi Army militia to withdraw from the streets of Basra and other cities, BBC Middle East correspondent Paul Wood - at the British military base just outside Basra - looks at the British role in the ongoing conflict.
Since a handover ceremony at Basra airport in December 2007, the role of British forces in southern Iraq has been to provide "overwatch" and such support as may be needed by the Iraqi forces, who have primary responsibility for security.
But the notion of what exactly constitutes support was severely tested as a large Iraqi force became bogged down in five days of street fighting against the Mehdi Army in Basra.
Some are asking why thousands of highly-trained British soldiers stood by, merely watching all this from the relative safety of their camp outside the city.
The British military was being sucked into the conflict, even if it did not send in a large ground force. British jets were overhead constantly, carrying out strafing runs and blasting militia fighters with cannon.
American air strikes were called in to target snipers
British artillery destroyed militia mortar positions. The Iraqis were re-supplied with large quantities of British ammunition.
There have also been a small number of both British and American special forces on the ground, co-ordinating air support for the Iraqi troops.
Maj Brad Leighton, a US military spokesman, said an American special forces team identified snipers on several rooftops before calling in aircraft to engage them with "precision gunfire". Sixteen of what the Coalition calls "criminal fighters" were killed.
Back in December, when the handover ceremony was conducted - indoors because of the danger of mortar fire - the Defence Secretary, Des Browne, said: "It has been a challenging journey, but we are not yet at the end of the road. Our role in Basra is changing to one of overwatch, but our commitment to Iraq is undimmed."
Some analysts say the conflict is too much for the Iraqis to handle
In theory at least, "strategic overwatch" as the military call it allows for British forces to intervene on the ground if the Iraqis are really in trouble. Are the British soldiers now failing to live up to that obligation?
The Army's position was that the Iraqis were not doing too badly on their own, that there was no need to be rushed into anything precipitate.
Its spokesman in Basra, Maj Tom Holloway, told me: "This is an Iraqi-planned, led and executed mission. They are standing on their own two feet.
"It's an indication of the Iraqi government's confidence in their own armed forces that they are able to conduct this operation with the levels of British and Coalition support that we are currently giving them."
Major Holloway added: "Fighting in an urban environment is not an easy thing to do. It's the hardest form of warfare and taxes command and control and the basics of fighting to the most extreme degree."
Why then did the Iraqi prime minister, Nouri Maliki, initially give the militias only until this weekend to surrender? When he later extended that deadline to 8 April, it was clear his gamble had failed. When things got difficult, it looked as if he had blinked first.
Prime Minister Maliki meets Shia leaders to try to end fighting
Now there is a ceasefire, with Moqtada Sadr ordering his militia's fighters off the streets of Basra and other cities in Iraq. But this is not a surrender.
The Mehdi militia remain in control of large swathes of Basra - areas like Timimiya, Jumairiya, Hamsa Mile and the Shia flats.
"Overwatch" for the British has meant literally having to watch amateur video on satellite TV of masked Mehdi fighters, weapons raised above their heads, doing little victory jigs in the streets of Basra.
Before the ceasefire was announced, the British Army tried to get us on an Iraqi helicopter into the centre of Basra. They wanted to be able to demonstrate that the Iraqi troops were performing well under pressure.
But as we were waiting on the helipad, the MoD in London vetoed that idea as too dangerous. The Iraqi base in the city was still under mortar fire. It all added to the impression of an Iraqi Army under serious pressure and struggling to cope.
The Iraqi defence minister, speaking from the base we had been attempting to reach, admitted the strength of the militia resistance had been a nasty surprise and that they were having to re-assess their tactics.
The Iraqi Army said that, as a measure of its success, it had killed more than 120 militia fighters and wounded some 450.
Our Iraqi local staff, from talking to hospitals, estimated there had been at least 300 fatalities during the operation. Was the gap between the two figures accounted for by civilian casualties?
Certainly, one Basra official, speaking by phone to an Arabic satellite channel, said that after two days of fighting, more than 40 civilians had been killed. A photographer for the AFP news agency said that in the aftermath of an air strike, he saw a woman and two children among eight bodies. Local people said more bodies - civilians - were inside four buildings damaged by the strike.
The British Army, while stressing that care was being taken about "collateral damage", could neither confirm nor deny the details of that air strike or the reports of civilian casualties in general.
Just before the ceasefire was announced, the British Army denied a report on Iranian satellite TV that it was moving ground forces into the city.
Moqtada Sadr told followers to "work with Iraqi government offices"
Eight to 10 armoured vehicles had set up a checkpoint at the Zubair bridge south of the city and were checking cars heading into Basra. But there was no intent, an army spokesman stressed, of sending British armour into the city.
Despite the Iraqi government's welcome of Moqtada Sadr's statement, this is not victory. What exists now in Basra now is a stalemate.
The militias which have made Basra a place of fear - murdering 100 women over the past year for failing to wear Islamic dress, for instance - remain in place.
And on the national political stage Prime Minister Maliki has been weakened, while Moqtada Sadr has been strengthened. The Coalition cannot be happy with any of that. The question remains, what is the British Army doing in southern Iraq?