By Bridget Kendall
BBC diplomatic correspondent
In some ways, the capture of 15 Navy personnel in the Gulf seems to be a mirror image of what happened in June 2004.
President Ahmadinejad's arrival has altered the diplomatic landscape
Then, as now, British servicemen on patrol in the disputed waters near the southern border between Iraq and Iran found themselves arrested and held by Iranian Revolutionary Guard forces though there are significant differences, like the exact location of the two incidents.
On this occasion both US and UK naval officers have said the patrol boats were on routine patrol inside Iraqi waters in the northern Gulf.
The incident in 2004 took place further north, in the narrow waters of the Shatt al-Arab waterway, and British officials were far less clear about which side of the disputed border they were.
It was "appalling weather" and "a confused situation" they said at the time - leaving open the possibility servicemen were indeed picked up in Iranian waters.
At any event, on that occasion the eight men and their three patrol boats were accused of entering Iranian territorial waters deliberately, "fully-armed with sophisticated weapons, radios and other instruments", according to the Iranians.
In 2004, though relations between Britain and Iran were strained, they had not deteriorated to the current level
Some reports even suggested they might be put on trial in Iran.
They were held for three days, and paraded blindfolded on Iranian television.
Only after they had made a televised apology for apparently losing their way and straying into Iranian territory were they flown to Tehran and released into the custody of the British embassy there.
The boats and equipment were never
returned to Britain.
But the more significant difference between then and now is the changed political climate.
HMS Cornwall was commissioned in 1988
In 2004, though relations between Britain and Iran were strained, they had not deteriorated to the current level.
British diplomats were still insisting Iranian influence in southern Iraq, though extensive, was largely benign.
And although the row over Iran's nuclear programme was brewing, a phone call to Tehran from Britain's Foreign Secretary Jack Straw was able to draw on previous good relations with the reformist Iranian Foreign Minister, Kamal Kharazzi, to help defuse the crisis.
Today the diplomatic landscape is more complicated.
Iraq influence claims
In the first place both Britain and the United States are now openly accusing some on the Iranian side of fuelling the violence inside Iraq.
Western attempts to persuade Iran to curb its nuclear ambitions have got nowhere
Just this morning the British commanding officer in Basra in southern Iraq said he had been told by local tribal leaders that Iranian agents were arming locals and paying them up to $500 a month to carry out attacks and, he said, "all circumstantial evidence points to Iranian involvement".
Further north the Americans have made similar allegations.
And Iran has repeatedly voiced its anger at the arrest in January of five members of Iran's Revolutionary Guard on suspicion of fuelling unrest. They are still being held by the Americans.
But beyond strains over Iraq, there is also rising tension over Iran's nuclear programme.
Since the previous reformist Iranian president was replaced by President Ahmadinejad in June 2005, Western attempts to persuade Iran to curb its nuclear ambitions have got nowhere.
At every turn President Ahmadinejad has defiantly insisted that Iran will pursue its legal right to enrich uranium.
President Ahmadinejad has even announced he wants to fly to New York to put his case to the Security Council
That has led the UN Security Council to up the ante by imposing targeted sanctions.
Now the pressure is about to be ratcheted up again.
The UN Security Council is poised to vote on a new resolution to widen those sanctions.
At UN headquarters in New York this week an attempt by South Africa to delay and dilute the new sanctions was firmly rebuffed by some of the veto-wielding members - including Britain.
Now it looks as though the vote could come as early as Saturday.
President Ahmadinejad has even announced he wants to fly to New York to put his case to the Security Council.
Supreme leader's warning
So is the incident connected to the wider diplomatic context?
Well, it certainly could be.
Earlier this week the Iran's supreme leader Ayatollah Ali Khamenei warned Western countries that if they continued to issue "threats and enforcement of coercion and violence, then undoubtedly they must know that the Iranian authorities will use all their capacities to strike enemies that attack".
Those conducting negotiations to end the crisis will have to tread carefully
And some Iranian officials briefing reporters privately have echoed that warning.
But it also seems there is an intense debate going on between different factions inside the Iranian government about how far it is really in the country's interests to push confrontation.
A recent conference in Baghdad which both the Americans and Iranians attended produced some sharp exchanges but also the hope that further co-operation might be possible.
And alongside the veiled threats, Iranian diplomats have also signalled they are ready for a compromise on the nuclear deal - so long as they are not forced into a humiliating climb-down.
All of which suggests this latest seizure of British sailors may well be part of a bigger diplomatic game.
But it is also still possible it is simply the result of a misunderstanding in a confused area where territorial waters have for decades been disputed.
So whether the diplomatic background makes it easier or harder to extract their release is difficult to tell.
At the very least, those conducting negotiations to end the crisis will have to tread carefully.