This is from Wikapedia: “Perhaps the oldest of the laws of the sea is the prohibition of piracy, as the peril of being set upon by pirates, who are motivated by their own greed, rather than by national allegiance, is shared by the vessels and mariners of all nations, and thus represents a crime upon all nations;
as such, since the time of the Ancient Romans, pirates have been held to be individuals waging a private warfare, a private campaign of sack and pillage, against not only their victims, but against all nations,
and thus, pirates hold the peculiar status of being regarded as “hostis humani generis”, the enemies of mankind.
Since piracy anywhere is a peril to every mariner and ship everywhere, it is held to be the universal right and the universal duty of all nations, regardless of whether their ships have been beset by the particular pirate captured, to capture, try, and either execute (which is the traditional custom of the sea) or otherwise suppress the pirate, such as by imprisonment.”
Thanks!