Ceasefires in Iraq are notoriously fragile but the agreement to end the fighting in Najaf may work because it is underwritten by Grand Ayatollah Ali al-Sistani, the most powerful religious leader in Iraq.
The winners and losers in the crisis in Najaf, where for three bloody weeks Muqtada Sadr, the radical young Shia cleric, and his Army of Mehdi fought the interim government of Iyad Allawi and the US army, are becoming clear.
Chief among the losers are the people of Kufa and Najaf, who have seen their cities devastated during the fighting and their hospitals and cemeteries filled with the maimed and the dead.
The main winner is Grand Ayatollah Sistani, who showed that he alone has the authority among Iraqis to bring the battles to an end.
The lesson for the US and Britain should be that they ignore his views at their peril and need to meet his demand for elections which will produce a legitimate and credible Iraqi authority.
For the government of Mr Allawi the outcome is a setback. “Their failure to finish Sadr is a defeat,” says Ghasan Attiyah, the Iraqi commentator and historian. “If they couldn’t eliminate him, why did they get into this crisis in the first place?”
Mr Allawi, two months after he was appointed head of an interim government by the US, has narrowed rather than expanded his already limited base of support.
There are signs of divisions within his cabinet, with the Islamist parties not giving him full backing in his assault on Najaf. The Kurds, the one Iraqi community still in favour of the US presence, have also distanced themselves from the government. Jalal Talabani, the powerful leader of the Patriotic Union of Kurdistan, had called for a peaceful solution.
The problem for Mr Allawi is that his most important support is the US army, but this is a two-edged weapon. The Iraqi army, police and National Guard are unreliable, ill-disciplined and prone, as was seen in Kufa in the last few days, to fire into crowds of demonstrators.
There is no doubt about the strength of the US army. But it continues to behave as if it was fighting the Soviet Army. Its main consideration is to keep its casualties low. It does not count Iraqi casualties. In Najaf it demolished any building from which it suspected gunfire was coming. US planes have dropped 2,000lb bombs near the holy shrine. Americans have been killing Iraqis in large numbers and this is unlikely to add to their popularity. Once again, Washington should learn that in Iraq military power does not necessarily turn into political influence.
Sadr and his militiamen may now withdraw from the shrine in the centre of Najaf but they have won a victory by surviving. Before last March, when the American envoy, Paul Bremer, had the disastrous idea of confronting him, Sadr was a significant but by no means a central figure in Iraqi politics. By attacking him the US has given credibility to his blend of nationalism and religion.
The Mahdi Army may now give up some of its light weapons in Najaf but nothing is easier to obtain in Iraq than a machine-gun or a rocket- propelled grenade launcher.
There are other shadowy players. The Iranians are seen by well-informed Iraqis as stoking political fires in Najaf and in southern Iraq to make sure that Washington never has a moment to fulfil its threats to overthrow or destabilise the Iranian government. The Iranians have been giving quiet support to Sadr and they will be pleased to have shown they can make life difficult for the US and Britain.
If theceasefire sticks there may be a few weeks in which the different players in Iraq can modify their policies. The preoccupation of Washington is to win the US presidential election in November. It may want to avoid further confrontations to persuade US voters that President George Bush knows what he is doing in Iraq.
Mr Allawi is more closely linked to the CIA than the State Department and the latter may become more influential within the divided US administration in shaping what the US does. An extraordinary aspect of the latest crisis is that it is the third time since April that the US has confronted Sadr, and each time has discovered that it dare not pay the political cost of eliminating him.
Ayatollah Sistani comes out of the crisis with his authority enhanced. The government of Iyad Allawi has suffered a defeat, shown its weakness, but has not collapsed. Dr Attiyah argues that the only solution to the permanent crisis in Iraq is for the US and its allies “to convince Iraqis that there will be free elections which will produce a legitimate government”.