A US naval reconnaissance drone was downed by Iranian missiles. President Donald Trump says he ordered - and then aborted - a retaliatory attack, changing his mind 10 minutes before the planned strikes. The sequence of events provided a glimpse of how a conflict might start.
Just suppose the president had not changed his mind. What might have happened? The first US strikes would have been limited in scope, targeting Iranian missile sites or radars, either associated with or similar to the ones that shot down the US drone. They would have been accompanied by a clear diplomatic warning to Iran (as appears to have been delivered over-night on Thursday) that this was indeed a limited attack, solely in retaliation for the loss of the US aircraft.
Mr Trump also reportedly offered an olive branch; according to reports the message to Tehran - which was relayed through Oman - included a further request for talks.
Say the strikes had gone ahead. What would happen then? The next move would be Iran's. According to one report, it responded last night that it was not interested in talks, and gave a warning of its own: "Any attack against Iran will have regional and international consequences," one un-named official told the Reuters news agency.
So where might such a conflict go and what would it look like? There are many variables to consider, and it is easier to say what will not happen. The Trump administration may be an implacable foe of the Iranian regime but there is not going to be a full-scale ground invasion of Iran to topple the regime. This is not Saddam Hussein's Iraq. Iran is an altogether more complex challenge both militarily and politically. Some in the White House clearly want regime change. They are likely to be disappointed. So rule out a major land war.
Any follow-up Iranian attack on US ships or aircraft would almost certainly be met by an escalation from the Americans. Iranian naval installations, air bases and so on would be hit by aircraft and cruise missiles with the focus, in part, on the Revolutionary Guard Corps whose naval arm appears to have played a prominent role in recent events.
Of course the United States can deliver punishing strikes against Iran's military infrastructure. But Iran has the means to strike back too. It can use a variety of measures from mines, swarming small boat attacks or submarines to disrupt operations in the confined waters of the Gulf. Oil tankers could be attacked forcing the Americans to take steps to protect them too.
Where the US clearly has an extraordinary advantage is in intelligence gathering and situational awareness. But as the downing of the very sophisticated and hugely expensive drone illustrates, there are significant US vulnerabilities too. All Iran may think it needs to do is to damage or sink a few US warships to make the price of this conflict one that Mr Trump will not want to pay.
Any war would be characterised by this "asymmetric" aspect. This term suggests a war of the weak against the strong - two sides with very different goals and very different metrics for success. If a war does break out the US will seek to pummel Iran's armed forces. It would probably go about it in its time-honoured fashion; initially taking down Iranian air defences and so on. But the Iranians simply need to do enough damage to turn US public opinion against the conflict - to make it appear open-ended and uncertain.
Iran, if under sufficient pressure, might also seek to spread the conflict more broadly, urging its proxies in Iraq, Syria or elsewhere to attack US targets. In extremis it might even try to prevail upon Hezbollah (in concert with its own forces in Syria) to launch rocket attacks on Israel. The goal would be to demonstrate to Washington that what Mr Trump might see as a short-punitive campaign actually risks setting the region on fire.
But why would either country allow themselves to drift into a war? After all, modern conflicts are not "won" in any conventional sense. The Americans should have learnt this lesson all too well from Afghanistan and Iraq. And Iran surely cannot think it can "beat" the United States in any meaningful sense? But the reality is that somewhere between punitive attacks on the one hand and a full-scale conflict on the other, both countries may believe that they can make strategic gains.
The US wants to contain Iran. Severely damaging its military capabilities - especially those of the Islamic Revolutionary Guard Corps - would serve this purpose. A serious reversal for Tehran might ultimately impact domestic politics in the country, though a war could equally have the unwanted result of consolidating support for the current regime.
Iran may be pursuing its own high-stakes version of a "regime change" policy too. It may see the current US administration as aggressive, but equally as indecisive and lacking support from its key western allies. By drawing the Americans into a costly and open-ended conflict, the Iranian leadership may believe that they can absorb the pain while damaging President Trump's chances in the next Presidential race. An Iranian reading of the US political scene may see the Democrats as more likely to return to some kind of nuclear deal and as more willing therefore to relax economic sanctions.
The problem for Tehran is that time is not on its side. The economic pressure of sanctions is hitting hard. Iran has relatively few cards to play beyond threatening chaos. Thus it may see escalation as a route out of this crisis. President Trump on the other hand, according to his own tweets, says he is "in no hurry".
Let's hope all this discussion is academic. President Trump appeared ready to strike back at Iran after the downing of the drone and then had second thoughts. Many will hope that it is these second thoughts that prevail in the president's mind over the coming days.
A war with Iran would indeed be costly and unpredictable. It would neither resolve the problem of Iran's nuclear programme nor of Iran's growing prominence in the region. That was the indirect outcome of Washington's last major war in the Middle East - the destruction of Saddam Hussein's regime in Iraq. Conflicts, it should be remembered, have unintended consequences.