Seven suspects have been detained after a suspected hijacking involving stowaways on a tanker off the Isle of Wight.
UK special forces completed the operation in nine minutes, BBC Defence Correspondent Jonathan Beale said.
Military assistance had been requested after the stowaways on board the Liberian-registered Nave Andromeda reportedly became violent.
The crew, who were locked in the ship’s citadel, are safe.
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: “I commend the hard work of the armed forces and police to protect lives and secure the ship.
“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 members of the Special Boat Service based at Poole, in Dorset, were involved in the operation, which also featured six helicopters.
Concerns over the crew’s welfare were raised at 10:04 GMT when the vessel was six miles off Bembridge, police said.
A spokesman said “verbal threats” had been made towards the crew.
A three-mile exclusion zone was put in place around the vessel.
Richard Meade, editor of shipping news journal Lloyd’s List, had earlier said there were thought to have been seven stowaways on board.
He said it was believed they had become violent towards the crew after they attempted to detain them in a cabin.
The tanker Andromeda, owned by Greek shipping company Navios, was en route from Lagos in Nigeria to Fawley oil refinery on Southampton Water.
It had not stopped anywhere else.
According to a source close to the shipping company, the crew were aware of stowaways on board, but the stowaways became violent towards the crew while it was off the Isle of Wight.
The crew retreated to the ship’s citadel, a secure area in which they can lock themselves, making it impossible for attackers to get in.
This is standard procedure during a terrorist or pirate attack, but there is no suggestion the crew were doing more than protecting themselves from the stowaways.
The crew contacted the coastguard, which then alerted police.
Navios are a long-established shipping company with a good reputation.
The 240ft-long (73m) ship is known to have left Lagos in Nigeria on 5 October and is currently situated south of the Isle of Wight.
Lawyers for the vessel’s owners said they had been aware of the stowaways on board for some time.
The Maritime Coastguard Agency said it was assisting police and search and rescue helicopters were at the scene.