Ships in the region are in constant danger from gun-toting pirates boarding and kidnapping crews for multi-million-pound ransoms.

In 2011, there were 176 attacks on ships by gangs of bandits off the Horn of Africa. They are such a threat the Royal Navy has 1,500 sailors on 14 warships operating round-the-clock patrols in the area.

Ms Owens, who regularly guides huge tankers through the waters, said the ship’s speakers can be aimed solely at the pirates so as not to disturb the crew.

‘It’s so effective the ship’s security rarely needs to resort to firing guns,’ said the 34-year-old, from Gartmore, near Aberfoyle, Stirling.

‘As soon as the pirates get a blast of Britney, they move on as quickly as they can.’

Steven Jones, of the Security Association for the Maritime Industry, said: ‘Pirates will go to any lengths to avoid or try to overcome the music.’

He added: I’d imagine using Justin Bieber would be against the Geneva Convention.’