The Royal Navy will join a US-led taskforce to protect merchant ships travelling in the Gulf.
The move comes amid growing tensions between the two western powers and Iran over the shipping route in the Strait of Hormuz.
Iranian forces seized British-flagged vessel Stena Impero last month, while the US has tightened sanctions on Iran.
Foreign Secretary Dominic Raab said the new maritime taskforce would give “reassurance for shipping”.
But it goes against plans laid out by his predecessor, Jeremy Hunt, for a European-led mission in the area.
The UK government confirmed last month that it would provide a Royal Navy escort, from warships HMS Duncan and HMS Montrose, for British-flagged ships passing through the strait.
The Ministry of Defence said the new mission would involve the same warships.
The US has also committed two warships to the mission, as well as aerial surveillance.
Washington has re-imposed – and latterly tightened – its own sanctions on Iran, after withdrawing from a 2015 deal to limit the country’s nuclear activities.
The UK and other European countries remain committed to the plan, but diplomatic tensions have been strained in recent months – increasing after the seizure of the Stena Impero.
Mr Raab said the UK’s decision to join the US-led mission did not change its commitment to the nuclear deal and that the government was working to “de-escalate the situation” in the Gulf.
Change of heart, change of government
British attempts to create a European-led coalition to provide maritime security in the Gulf – and to deter Iran – have clearly not born fruit, at least yet.
Hence the UK decision to “join an international maritime security mission”, which will be led by the US.
So far, the UK is the only other member.
The apparent change of heart has been made easier by the recent changes in Downing Street.
The UK government still says it hopes the taskforce can transition to a European-led mission – though so far no other European countries have said they’re willing to commit warships to protect merchant shipping as part of an international maritime force.
The government also insists that its policy to Iran has not changed.
Britain says it remains committed, along with EU allies, to maintaining the Iran nuclear deal – unlike the US.
But Iran may view this latest move differently.
Announcing the new mission, Defence Secretary Ben Wallace said the UK was “determined to ensure shipping is protected from unlawful threats”.
He added: “Upholding international maritime law and freedom of passage is in all our interests.
“We are seeing, across our seas and oceans, too many incidents that seek to challenge such freedoms.”
UK-Iran tension in the Gulf
4 July: Royal Marines help authorities in Gibraltar seize a tanker carrying Iranian oil because of evidence it was heading to Syria in breach of EU sanctions
9 July: The UK raises the threat to British shipping in Iranian waters in the Gulf to “critical”
10 July: A Royal Navy ship warns off Iranian boats attempting to impede a British oil tanker in the region
19 July: British-flagged oil tanker Stena Impero is seized by Iran’s Revolutionary Guard
28 July: The Royal Navy sends a second warship to the Gulf to protect British ships
*see full story by BBC News