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.
The ship later docked in Southampton.
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.
The operation by Special Boat Service commandos is exactly what this elite and secretive unit trains intensively for.
The SBS, headquartered at Poole in Dorset, is less well-known than its Hereford-based counterpart, the Special Air Service (SAS), but both units have been called on over the years for delicate counter-terrorism and hostage rescue missions, often in arduous conditions.
“Fast-roping” down from helicopters at sea and at night can be fraught with dangers but it often results in taking assailants by surprise – this operation took just nine minutes.
It would not have been possible though, if the crew had not followed a maritime drill enshrined in the manual called BMP5 – Best Management Practice 5th edition.
Withdrawing to the ship’s strong room known as “the citadel” and locking themselves inside meant they were able to call for assistance from a secure space.
In most cases of maritime piracy off Somalia hostage rescues were only ever undertaken if all the crew were safely inside the citadel.
The 748ft-long (228m) ship left Lagos on 5 October, 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.
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 reporters: “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.