By Frank Gardner
BBC News security correspondent
Iranian naval forces in the Gulf tried to capture an Australian Navy boarding team but were vigorously repelled, the BBC has learned.
The Australians have also been patrolling northern Gulf waters
The incident took place before Iran successfully seized 15 British sailors and Marines in March.
The lessons from the earlier attempt do not appear to have been applied in time by British maritime patrols.
The 15 Britons were searching a cargo boat in the Gulf when they were captured over a boundary dispute.
'Having none of it'
When Iranian Revolutionary Guards captured the British sailors and Royal Marines in March, it was not exactly their first attempt.
It turns out that Iranian forces made an earlier concerted attempt to seize a boarding party from the Royal Australian Navy.
The Australians, though, to quote one military source, "were having none of it".
The British personnel were eventually released
The BBC has been told the Australians re-boarded the vessel they had just searched, aimed their machine guns at the approaching Iranians and warned them to back off, using what was said to be "highly colourful language".
The Iranians withdrew, and the Australians were reportedly lifted off the ship by one of their own helicopters.
The circumstances for the Britons in March were slightly different in that they were caught so much by surprise that, had they attempted to repel the Iranians with their limited firepower, they would doubtless have taken very heavy casualties.
But military sources say that what is of concern is that the Royal Navy did not appear to have taken sufficient account of the lessons of the Australian encounter.
In an oblique reference to the threat from Iran, Britain's First Sea Lord, Admiral Sir Jonathon Band, has recently admitted there was a need for greater strategic awareness in the northern Gulf.