The war has revealed the limit of US dominance over Iran
Jeremy Bowen
BBC International editor
Image source, EPA
The war has been President Donald Trump's worst foreign policy blunder – so far.
Turn the clock back to 27 February, as American and Israeli forces were preparing to strike, arming their aircraft, briefing their crews and programming targets for their missiles.
Both Trump and Israel's Prime Minister Benjamin Netanyahu made video appearances to announce the start of a war that they believed would be short, sharp and victorious. It was a stunning misjudgement.
The war has damaged the US's alliances with the oil-producing Arab monarchies of the Gulf, whose business model as islands of stability in the turbulence of the Middle East will take years to repair.
China will have been watching closely as the United States burned through hard
-to
-replace stocks of weapons and came up against the limits of its power.
The agreement, assuming no more last-minute hitches, ends a war that was based on America and Israel's misreading of the strength of their enemy in Tehran. It is not a peace deal.
It defers the thorniest issues to future negotiations. That agenda will include the future of Iran's nuclear programme and the level of sanctions relief it will get in return for concessions.
The memorandum of understanding clears the way for the nuclear negotiators to reconvene and for ships to transit the strait. That is exactly where they were 24 hours before the US and Israel went to war.