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.
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.”