Prosecuted? Prosecuted?!
Here's your prosecution ...
That is the general idea. However, back in the days of the Barbary Pirates, the US Navy was faced with a peculiar and annoying problem: US federal judges.
When they captured pirates off the African coast, these judges wanted them to stop what they were doing and transport them back to the US to face piracy charges and be hung. Unlike the British, who held trial on their vessels and hung the pirates on their own, slowly sinking, scuttled ships.
So since the US and the British were on fairly neutral terms at the time, the US ships’ Captains came up with a novel solution. Since only the top officers aboard ship had access to navigational maps, they would invariably discover that they had captured the pirates in British patrol waters.
So they dutifully notified the British, who were more than happy to officially receive, try and hang those pirates and sink their worthless “prize ships” as soon as they were turned over. Can’t be poaching pirates, and all.
Moving forward to modern times, the USN still faces annoying problems like this today, so have to discover appropriate solutions, especially since the pirates are not brigands, but state actors.