Seven people were detained when military forces stormed a tanker suspected to have been hijacked off the Isle of Wight.
Sixteen members of the Special Boat Service (SBS) ended a 10-hour standoff which started when stowaways on board the Liberian-registered Nave Andromeda reportedly became violent.
The stowaways, believed to be Nigerians seeking UK asylum, were handed over to Hampshire Police on Sunday night, reports the BBC.
The 22 crew members were found safe.
The ship later docked in Southampton.
BBC defence correspondent, Jonathan Beale said British forces descended on to the vessel by rope from four Royal Navy helicopters after nightfall.
“The seven stowaways – believed to be Nigerians seeking asylum in the UK – were detained and handed over to Hampshire Police,” he said.
The Ministry of Defence called the incident a “suspected hijacking” and said Defence Secretary Ben Wallace and Home Secretary Priti Patel authorised the operation in response to a police request.
Wallace said: “In dark skies, and worsening weather, we should all be grateful for our brave personnel. People are safe tonight thanks to their efforts.”
Mrs Patel tweeted she was “thankful for the quick and decisive action of our police and armed forces who were able to bring this situation under control, guaranteeing the safety of all those on board”.
Beale said the individuals were detained after they were met with “overwhelming force”.
He said along with the SBS squad, a team of Royal Navy divers was deployed in one of the Royal Navy helicopters in case the vessel had been mined – but it had not.
The 748ft-long (228m) ship is known to have left Lagos in Nigeria on October 5, and was heading to Fawley Oil Refinery near Southampton.
As it approached its destination just east of the Isle of Wight on Sunday morning it was reported that seven stowaways on board had become violent.
Lawyers for the vessel’s owners – Greek shipping company Navios – said the crew had been aware of the stowaways on board for some time.
Concerns over the crew’s welfare were raised at 10:04 GMT when the vessel was six miles off Bembridge, police said.
The 22 crew members locked themselves in the ship’s citadel – secure area – and were safe.
A three-mile exclusion zone was put in place around the vessel.
Tobias Ellwood, Chairman of the Commons Defence Committee, said the boarding of the tanker was a “good outcome”.
He said: “Seven stowaways on board taking over a ship or causing the ship not to be in full command would have triggered a multi-agency alarm and then well-rehearsed classified protocols were then put into action.”
Hampshire Constabulary said late on Sunday: “Police are investigating this incident and we have a number of inquiries to carry out to establish the full circumstances.”
Bob Sanguinetti, Chief Executive of the UK Chamber of Shipping, told BBC Radio 4’s Today programme: “Nothing at this stage suggests that this was hijacking and in fact hijacking of this nature is extremely uncommon.”
In December 2018, four stowaways were detained after they ran amok on a container ship in the Thames Estuary.
The men, from Nigeria and Liberia, waved metal poles and threw faeces and urine after being found hiding on the Grande Tema.