British forces stormed an Italian cargo ship on Friday and regained control after stowaways threatened crew members as it sailed close to the coast of southeast England.
Police said no one was injured in the operation.
The Sun newspaper said the rescue was led by members of the navy's elite Special Boat Service.
Four stowaways had threatened crew on the ship, the Grande Tema, a spokesman for the boat's operator, Grimaldi Lines, said.
Four men were detained under Britain's immigration laws and the vessel was being taken safely to the port of Tilbury, police said in a statement.
Sky News said the stowaways were believed to have boarded the ship in Nigeria and had demanded to be taken to the English coast, threatening the crew with iron bars.