But speaking to state news agency IRNA, Abbas Mousavi, an Iranian government spokesman, said: “The legal pretexts for the capture are not valid...The release of the tanker is in all countries' interest.”
He threatened reciprocal measures against the UK if the tanker was not allowed on its way.
The warning came just a day after three Iranian boats were said to have impeded a British commercial tanker as it passed through the Strait of Hormuz on Wednesday – an act of apparent retaliation for the Gibraltar seizure.
Jeremy Hunt, foreign secretary, said the escalating tensions now showed that money should be spent strengthening the Royal Navy.
The Tory leadership hopeful said more warships were needed if the country is to continue to defend its interests abroad and on the seas.
Writing in the Daily Telegraph, he called the incident “deeply troubling” and said: “Three vessels from a foreign military power tried to seize a British ship conducting its rightful business.
“The simplicity of these words belies the incredible menace behind Iran’s actions. Not for the first time, Britain’s interests were defended by the Royal Navy.”
He added: “When you look at this week’s events it shows that in recent decades we have run down the navy too much.
“Our current commitment is for 19 destroyers and frigates supported by excellent offshore patrol vessels.
“If I become prime minister, I will review this commitment as part of a wider look at our defence capability.”
Meanwhile, Gibraltar has said its decision to help detain the tanker – which was carrying 2.1 million barrels of crude oil – was one it took on its own and not at the behest of any other state.
"All relevant decisions in respect of this matter were taken only as a direct result of the government of Gibraltar having reasonable grounds to believe the vessel was acting in breach of established EU sanctions against Syria," Fabian Picardo, the territory's chief minister, told parliament on Friday. “There has been no political request at any time from any government that Gibraltar should act or not act on one basis or another."
Foreign Office officials here believe the harassment of the British ship in the Strait of Hormuz was a direct result of the Gibraltar seizure: security levels for ships passing through or close to Iranian waters had already been raised to three, meaning an incident was considered imminent.
As well as the Montrose, the Navy has four mine countermeasures vessels and the Royal Fleet Auxiliary Cardigan Bay logistics ship in the Gulf.
The new clashes come at a particularly sensitive time with tensions between Iran and the West ratcheted up over the unravelling of the Iran nuclear deal, which the US withdrew from last year.
The European parties to the agreement, including the UK, earlier this week expressed “deep concern that Iran had begun enriching uranium to a higher level of purity than permitted under the terms of the agreement”.
Join our new commenting forum
Join thought-provoking conversations, follow other Independent readers and see their replies