Fifty nations have taken part in a two-week defensive maritime exercise designed to promote security in the Gulf.
IMX19 (International Maritime Exercise 2019) was the third exercise of its kind and the largest so far.
Six thousand people and 30 ships were involved in the exercise which follows heightened tensions in the region.
In July, the Stena Impero, a British-flagged tanker, was seized by Iran in the Strait of Hormuz.
It came after Royal Marines detained an Iranian vessel off the coast of Gibraltar that was allegedly transporting oil to Syria in breach of EU regulations.
IMX19 spanned a vast area from mock mine-clearance scenarios in the Gulf to other security operations in the Suez Canal and around the Bab-el-Mandeb Strait.
Located 45 kilometres north of Bahrain, RFA Cardigan Bay played the role of the mother ship.
She hosted dozens of mine warfare specialists and divers for the mine countermeasure part of the exercise.
"We still have those old, traditional mines that you would have seen in World War One and Two footage, right up to modern, high-tech mines that are built to hide and blend in," said Commander Simon Cox, Commander UK Mine Counter Measures Force.
"As modern as many of the technology is these days, it still takes the skills and professionalism of our men and women these days to sometimes get hands-on to determine what they are how to defeat them."
On board RFA Cardigan Bay, there were mine warfare teams from 10 different nations, all under the command of the Royal Navy battle staff.
Out in the Gulf, the organisers of the exercise laid replica mines and for two weeks military teams had to hunt them down.
The teams had a range of high-tech tools from sonar-equipped helicopters to remote underwater vehicles, like the Remus, which can dive down 100 metres.
"Because of the shadow it can produce, it can even pick up a Coke can," said Able Seaman Luke Field from Fleet Diving Unit 3.
"Because of the metallic ping that comes back, you just measure that or you can have a look at the shape of it.
"It's so good, it's pretty much better than what you can get on board ship."
Along with unmanned vehicles, the elite Royal Navy unit also includes 25 mine clearance divers who are trained to find and dispose of underwater mines anywhere in the world.
The unit's job is very similar to underwater bomb disposal and is potentially very dangerous.
Risks are not limited to the risk of explosions but also the hazards of diving down as deep as 60 metres.
Due to these risks, the Royal Navy has a mobile hyperbaric chamber on hand.
While the Gulf is relatively shallow, the Royal Navy still practise their emergency drills, including how they would treat a diver with the bends.
"The first part of the assessment of the diver would be looking at their airways, breathing and circulation," said Surgeon Lieutenant Ben Kingsley-Smith, the doctor on board RFA Cardigan Bay.
"If we find anything that we need to treat, we'll treat it here first.
"When we are happy that we've got the patient to a stable state from the medical point of view, we'd then take him around to the dive chamber."
The divers worked alongside teams from France and Australia.
Royal Navy personnel were also joined by British soldiers, bringing the number of people on board RFA Cardigan Bay to 260.
Members of the Port and Maritime Regiment, from the Royal Logistic Corps, operated the 30-tonne cranes that were used to lift the divers' boats in and out of the water.
The recent rising tensions in the Gulf meant personnel on RFA Cardigan Bay were continually scanning the horizon on the lookout for Iranian fast patrol boats.
"[The Iranians] are naturally quite curious, so they will come and have a look in much the same way that if they come into UK waters we will go and have a look at them," said Third Officer Hannah Riekemann, Officer of the Watch on RFA Cardigan Bay.
"Most of the time it is fairly friendly. They won't do anything that impacts us, and that's how we like to keep it."
In July, the Royal Navy's HMS Montrose drove off three Iranian boats that were trying to stop a British oil tanker in the Strait of Hormuz.
The Gulf has not been mined since the 1980s but Tehran threatened as recently as June to block the Strait of Hormuz in retaliation for US sanctions.
For more than a decade RFA Cardigan Bay has been completing tasks in the Gulf, supporting Royal Navy ships that patrol the vital waterway as part of a 33 nation maritime taskforce.
A sixth of the world's oil and a third of the world's natural gas pass through the Strait of Hormuz every year.