At the start of this month the Gibraltarian authorities - aided by a detachment of Royal Marines - detained a tanker which was believed to be carrying Iranian oil destined for Syria.
This would have been a breach of EU sanctions directed against various Syrian entities and individuals.Gibraltar and Britain insist they were acting entirely legally, but Tehran has described the episode as piracy.
And ever since the vessel was detained, the Iranians have been threatening to seize a British-flagged ship in retaliation.
Indeed, an earlier effort by Iran's Revolutionary Guard Corps to divert a British tanker into Iranian waters was only averted by the muscular intervention of a Royal Navy warship, the Type 23 frigate HMS Montrose.
But there is a limit to what one warship can do.
This time it appears not to have arrived on the scene quickly enough and the Stena Impero and its crew are now in Iranian hands.
A second ship that was detained by the Iranians was subsequently allowed to go, underlining the fact that this seems to be a direct retaliation for the arrest of the tanker off Gibraltar.
Diplomacy, not force
So what happens now?
Well the first thing to remember is that this specific row between Tehran and London is only one aspect of an already highly volatile situation in the Gulf.
The Trump administration's decision to walk away from the international nuclear deal with Iran and to re-apply sanctions is having a hugely damaging impact on the Iranian economy.
Iran is pushing back.
While it denies some of these actions, the US and its allies believe it was responsible for attacking several vessels with limpet mines.
It has also shot-down a sophisticated US unmanned aircraft.
And, as if to underline the risk of conflict, the US claims more recently to have shot down an Iranian UAV (drone) that approached one of its vessels. The Iranians deny the loss.
So the first order of business is to try to calm tensions and avoid escalation.
Foreign Secretary Jeremy Hunt has made it clear that he wants this problem resolved urgently, but that the way ahead will rely upon diplomacy not force.
He has already spoken with his US counterpart - Secretary of State Mike Pompeo.
He has tried, but so far failed, to speak to his Iranian opposite number.
There are likely to be many more bilateral conversations in the hours and days ahead as Britain seeks to develop as wide a coalition of countries as possible to try to encourage Iran to release the Stena Impero.
While Britain will not want to have this presented as a simple exchange of vessels - it maintains that Iran's actions, contrary to its own, are illegal - it is highly likely that the fate of the Grace 1 - the vessel detained off Gibraltar - will have to figure in any future arrangement.
Since Iran's threats to UK-flagged shipping were well known, this episode is highly embarrassing for the British government.
The priority now will be to ensure the safe return of the vessel and its crew.
But difficult questions will have to be answered concerning the decisions that have been taken and the resources available.
Given the highly fragile and volatile situation in the Gulf, together with the desperate need to bolster the flagging Iran nuclear accord, was it sensible to detain the vessel carrying Iranian oil off Gibraltar?
Were the wider potential consequences adequately examined?
What did ministers think Iran would do?
And did they really believe that this arrest could be insulated from the wider crisis in the Gulf?
Secondly, why was UK shipping not adequately protected in the Gulf?
There are only a relatively small number of UK-flagged vessels passing through the Strait of Hormuz, but, as events have shown, far too many for one hard-pressed warship and its crew to provide security.
This time, HMS Montrose apparently arrived just minutes too late to intervene.
A second warship is on its way, the Type 45 destroyer HMS Duncan.
We are told that the decision to announce the despatch of the second vessel was thought about long and hard - balancing the need for security against a desire not to do anything to escalate tensions.
Nonetheless, Iran was signalling its intentions loud and clear. It was neither deterred nor dissuaded from seizing a British tanker.
The episode raises some uncomfortable issues regarding Britain's global maritime role.
The UK has the pretence of playing a significant naval role in the Gulf.
This today amounts to a naval base, one frigate, a Royal Fleet Auxiliary amphibious landing ship and four mine counter-measures vessels - what used to be called minesweepers.
One destroyer is on its way and another vessel is due to head to Gulf waters in due course.
This force was not configured to protect British shipping.
Naval experts believe that the Royal Navy simply no longer has sufficient numbers of work-horses - frigates and destroyers - to be able to surge vessels into the Gulf when a crisis beckons.
You clearly cannot be everywhere at once.
Britain must tailor its armed forces according to its means. But this crisis did not erupt yesterday.
And for whatever reason, the naval presence there was insufficient to prevent the seizure of a British merchant vessel.
Perhaps Iran's warnings were not taken seriously enough?