When it comes to pirates, Robert Louis Stevenson has a lot to answer for.
His Treasure Island novel has inspired the popular image of piracy, from peg legs and parrots to bottles of rum and chests of gold.
In truth, today’s pirates are more likely to be armed with rocket-propelled grenades than cutlasses.
Peter Lehr, senior lecturer of terrorism studies at St Andrews University, has laid bare the reality of one of the oldest and most enduring forms of crime.
He says no matter how well patrolled international waters may be, as long as there is ill-feeling on land, crimes will continue on the seas.
His newly-published history of piracy, stretching from the Vikings to 21st-Century Somali raiders, examines the roots of high seas plundering – and it is almost always poverty.
He said: “It’s often about getting by, rather than getting rich.
“Pirates often feel they have no other choice.
“If you are starving to death and it’s do this or die, well, while I don’t condone it, I do have empathy.
“There are others, of course, such as in Thailand, where they saw people fleeing Vietnam with all their possessions and realised there were lots of riches to be had, and they were brutal and would rape women. I have no empathy for them.
“Quite often those who turn to piracy are fishermen affected by illegal trawling – they have a legitimate grievance and start to fight back, but grievance gives way to greed and gives rise to opportunity.
“That is something which has remained consistent through the ages.”
As an expert in maritime terrorism, Dr Lehr says there are grey areas between terrorism and piracy.
“Piracy is organised crime, making private gains, while terrorism is doing similar but for political gain.
“If someone hijacks a ship and demands a ransom, while another hijacks a ship and makes political demands – one is piracy and the other is terrorism. But it is sometimes difficult to differentiate.
“In south-east Asia, you could question whether the Abu Sayyaf group are pirates or terrorists with the demands they make.”
What isn’t up for debate is how far removed the fictitious accounts are from real pirates.
“The fictionalised pirates come across as social bandits, Robin Hoods of the sea,” he added.
“They are depicted as lovable rogues, like Jack Sparrow or the TV portrayals of Francis Drake. Then there’s Treasure Island and even The Muppets version of the story, where no one is seen as getting hurt.
“That might exist sometimes, but so is being tortured and butchered.”
So, too, are today’s boats much different from the Hollywood depiction – especially now.
“Waters are so heavily patrolled that there are hardly any high-sea pirates apart from the Somalis,” Dr Lehr continued.
“Usually, pirates will attack ships close to the coast using speedboats.
“It’s very hard to sail with a big ship and lots of guns, looking like a warship.
“There is lots of technology nowadays – helicopters, radar systems – pirates have to hide in plain sight.
“They use very small vessels, so can only use weapons such as big knives, assault rifles and rocket-propelled grenades.
“If they wanted heavy machine guns then they would really need a bigger boat. They can’t overload the vessels with weaponry.”
Piracy continues because sometimes it’s easier for countries to turn a blind eye, or because they don’t have the resources to patrol the waters.
Places like the Philippines or Indonesia can be hotspots because their navies are too stretched.
We don’t hear many reports on the bloodthirsty Nigerian pirates in the Gulf of Guinea, Mr Lehr says, because it doesn’t tend to affect the UK.
But the Nigerian navy is fighting back and Indonesia “has got its act together”, so statistics for the first quarter of this year show the rate of piracy has dropped.
So, too, have acts of piracy quietened in Somalia, which became a hotspot of sea-borne crime from 2005-12.
It began with The Seabourn Spirit, a luxury cruise ship with more than 200 holidaymakers on board, which was attacked 100 nautical miles off Somalia’s coast by armed pirates on two seven-metre-long boats.
The quick-thinking crew sounded the sonic gun – an ear-piercing high-frequency sound that kept the attackers at bay, as did a high-pressure hose turned on the pirates – and the cruise liner escaped.
Then there was the MV Maersk Alabama, which was carrying food aid to Somalia, in 2009.
What happened next – a stand-off which unfolded between the crew holding the pirate leader hostage and the remaining pirates who had captured the ship’s captain – was turned into a Hollywood movie, Captain Phillips, starring Tom Hanks.
Navy Seal snipers eventually rescued Phillips by shooting his three captors dead.
And German-American journalist Michael Scott Moore was held captive for 977 days by Somalian pirates after being captured while researching a book on the subject in 2012.
Dr Lehr explained: “The first wave of Somali pirates at this time were fishermen fighting back, who realised it was more lucrative due to ransom demands.
“Soon it became like the California gold rush, with young militiamen flocking for a piece of the action.
“Depending on your place in the pecking order, up to £100,000 could be made.
“Somali pirates are quiet just now, but in 2017 they targeted a trawler in Mogadishu. It was released without ransom when they learned it belonged to Somali businessmen, but the incident shows the pirates are still there and biding their time.”
As they have for centuries, pirates will pick their moments and are unlikely to ever disappear completely, according to Dr Lehr.
“Piracy can be stopped if there is law and order on land,” he added.
“Landborne crime is still around and will always be there, and piracy is the seaborne equivalent.
“There are still lots of rich pickings out there for pirates for some time to come.”
Pirates: A New History, From Vikings To Somali Raiders, Yale University Press, out now