Thanks but your answer only explains the situation within 12nm of the beach.
But most of the Somali piracy is in fact happening well outside the territorial limits of the countries in the area so what is actually preventing the naval forces involved from simply :ar15 "wasting the mutha####ers" :ar15 and providing the local sharks with free dinners.
"Pirate skiff two points off the port bow Captain!"
"Confirm they are pirates?"
"Aye aye, Captain, Kalashnikovs and RPGs clearly visible."
"Weapons, engage with a burst of 25 mil if you please."
"Taget in range."
Brrrrrt!
"Target engaged Captain."
"Target sinking Captain."
"Very well, secure weapons. I believe we're having steak for dinner today."
When did high seas pirates acquire the right to life, a fair trial, and all that namby-pamby crap?
I believe when enough pirates simply disappear without trace (and without comment from the facilitators of the the disappearances) the remaining ones might seriously reconsider their career options.
It is not just where the piracy takes place, but where you catch them. The piracy may be on the high seas, but once they are within ‘12 miles of the beach’ international forces are not supposed to touch them.
It is rumored that the Russians and the Chinese practice your favorite scenario.
For the rest, the law used to be trial at sea followed by execution. But with modern communications the captain of a vessel longer has the power of a feudal lord and the civil rights people have written laws requiring a
civilian court trial. Which means either the closest nation, the nation in which the pirated vessel is registered, or the nation of the warship that apprehended the pirates. Unfortunately the closest nation is in Africa, and cannot afford the number of trials and incarcerations. Also, the EU refuses to send any pirates to nations where they might be subject to the death penalty. Most of the nations to which the ships are registered don’t want the expenses either. So that leaves the nation to which the warship belongs.
Other problems include the cost of incarceration after conviction, and what to do with them after they have served it. Especially in the EU the various human rights treaties and the EU constitution are being interpreted in such a way that they may become economic refugees even before the trial starts. This is why catch-and-release is the norm for EU vessels.