An Iranian official, speaking to state news agency IRNA, warned the UK not to get involved in “this dangerous game”.
It comes after the UK government said Iranian boats tried to impede a British oil tanker in the Gulf on Wednesday.
Foreign Secretary Jeremy Hunt has said events in the Gulf showed the Royal Navy needs more warships.
The leadership hopeful has vowed to reverse cuts to the navy if he becomes PM.
The relationship between the UK and Iran has become increasingly strained in recent weeks.
Last week Royal Marines helped the authorities in Gibraltar seize the Iranian-owned tanker Grace 1 amid suspicions it was carrying oil to Syria, in breach of EU sanctions.
Iran has suggested the UK seized the tanker “at the behest of” the US government “in line with America’s hostile policies”.
Foreign ministry spokesman Abbas Mousavi said: “This is a dangerous game and we advise them not get involved in this game under America’s influence.”
He added: “We ask them again to release the tanker immediately, which will be in all countries’ interest.”
Iran previously claimed the tanker was not bound for Syria and threatened to seize a British oil tanker in retaliation, if the tanker was not released.
Senior Iran cleric Kazem Sedighi was reported by Iranian state TV as saying: “The British will soon get a slap from the strong arms of our establishment for their daring, reckless and negligent act that will make them regret it for good.”
On Tuesday, the UK raised the threat to British shipping in Iranian waters in the Gulf to the highest level – where the risk of attack is critical.
The following day, boats believed to belong to Iran’s Islamic Revolution Guard Corps (IRGC) approached the British Heritage tanker and tried to bring it to a halt as it was moving out of the Gulf into the Strait of Hormuz.
HMS Montrose, a British frigate shadowing the BP-owned tanker, was forced to move between the three boats and the ship, a Ministry of Defence spokesman said.
Iran denied any involvement in the attempted seizure.
Mr Mousavi insisted his country would not impede the passage of ships in the Gulf which “comply with the rules”.
Tensions escalated between the UK and Iran after Britain said the Iranian regime was “almost certainly” responsible for attacks on two oil tankers in June.
The ongoing imprisonment of Nazanin Zaghari-Ratcliffe is also a long-standing bone of contention between the two countries.
The UK continues to press Iran to release the British-Iranian mother who was jailed for five years in 2016 after being convicted for spying, which she denies.
Relations between Iran and the US are also under duress, after the Trump administration pulled out of an international agreement on Tehran’s nuclear programme and reinforced punishing sanctions against Iran.
The US blames Iran for attacks on six oil tankers in May and June.
It has said it wants to create an multi-national military coalition to safeguard waters around Iran and Yemen.
The US said it was talking to a number of countries with the “political will” to support the plans, which would include providing boats to escort commercial ships through the area.
Providing armed naval escorts for commercial shipping is expensive, time-consuming and requires a fair degree of logistical planning and coordination between different countries.
It’s been done before in the Gulf, in the late 1980s, when the US Navy escorted Kuwaiti oil tankers during the Iran-Iraq war.
More recently, several navies have provided escorts for shipping passing between Yemen and Somalia, protecting them from attacks by Somali pirates.
But, ultimately, these military escorts can only be a temporary remedy for a much deeper problem that needs resolving.
If tightening sanctions on Iran prevent that country from exporting most of its oil then the temptation by its senior commanders to lash out in response will only grow stronger.
Mr Hunt said there was “incredible menace” behind Iran’s actions in the Gulf.
Writing in the Telegraph, he promised to reverse cuts to the size of the Royal Navy.
The foreign secretary said the Royal Navy had been “run down” over recent decades and he would review the size of the current fleet of 19 frigates and destroyers.
Mr Hunt has previously pledged to boost defence spending by £15bn over the next five years.
He said investment in defence was needed in the face of new threats, such as cyber-attacks, and “to send a strong signal about Britain’s role in the world” as it left the European Union.
Increasing defence spending would also “keep the Atlantic alliance strong” by demonstrating to the US that the UK is “stepping up to its commitments on defence”, he added.
He said he also wanted to see more fast jets on Britain’s two new aircraft carriers, which he described as “a vital tool for projecting power”.
The UK is one of the few European members of Nato to reach the current target for defence spending of 2% of GDP – but Mr Hunt has pledged to boost this to 2.5% by 2023-24 if he becomes prime minister.
Mr Hunt’s leadership rival, Boris Johnson, has also committed to increasing the UK’s defence budget, but BBC defence correspondent Jonathan Beale said his plans appeared more modest.