The jokes about peg legs, parrots and the Jolly Roger are long gone. Piracy is no laughing matter and these days it is the lawyers who would rule the waves.
According to the 1982 United Nations Convention on the Law of the Sea (UNCLOS), piracy is defined as "any illegal act of violence or detention, or any act of depredation, committed for private ends by the crew or the passengers of a private ship".
Further, UNCLOS states that "all states have an obligation to cooperate to the fullest possible extent in the repression of piracy and have universal jurisdiction on the high seas to seize pirate ships and aircraft, or a ship or aircraft taken by piracy and under the control of pirates, and arrest the persons and seize the property on board". The convention also allows states to "exercise a right of visit vis-a-vis ships suspected of being engaged in piracy".
What sounds relatively simple on paper is more complex in reality. An immediate difficulty is the phrase "high seas", which refers to international waters. Most attacks are carried out in Somali waters, but Somalia has no effective government on land, let alone at sea, though it is legally responsible for stopping pirate attacks.
In an attempt to resolve this, the UN Security Council has passed resolutions authorising certain nations, such as those involved in Operation Atalanta, to enter Somali waters to pursue suspected pirates.
The definition of piracy is also complicated by the law in individual countries. A US court last month convicted Mohammad Saaili Shibin, the hostage negotiator in a hijacking during which four Americans were killed. Because Shibin was operating on land, his lawyers argued - unsuccessfully - that he could not be a pirate, a question that still has to be tested on appeal.
Then there is the question of the pirates' human rights. British Royal Navy captains have been warned that captured Somalis might be able to claim asylum in Britain - even if convicted - because they could face torture or execution if sent home.