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.
The 22 crew members were found safe.
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.
Navios Tanker Management, operator of the crude oil tanker, said the master of the vessel became concerned for the safety of the crew "due to the increasingly hostile behaviour of the stowaways" who had "illegally boarded" in Lagos, Nigeria.
In a statement released on Monday, the company thanked the UK authorities for their "timely and professional response".
"Navios would also like to pay tribute to the master of the Nave Andromeda for his exemplary response and calmness and to all the crew for their fortitude in a difficult situation," it added.
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.
Mr 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".
Mr 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.
Mr Beale said a defence source confirmed the master of the ship was on the bridge and in control of the vessel at all times, while the rest of the crew was locked away safely in the ship's citadel.