In dealing with Somali pirates, from a U.S. law perspective, the pirates can be prosecuted in American courts.
The SUA Treaty is a start. In the wake of the Achille Lauro murders, many countries signed and ratified the Suppression of Unlawful Acts (or SUA) Treaty (a.k.a. Rome Treaty). The Commandant of the Coast Guard’s blog has some good insight into the geo-political issues, vis a vis, the Rome Treaty (a.k.a. SUA) The SUA treaty required signatories to enact domestic legislation to fulfill its aims.
The United States adopted such legislation at 18 U.S.C. 2280, which provides:
Sec. 2280. Violence against maritime navigation
(a) Offenses. -
(1) In general. - A person who unlawfully and intentionally -
(A) seizes or exercises control over a ship by force or threat thereof or any other form of intimidation;
(B) performs an act of violence against a person on board a ship if that act is likely to endanger the safe navigation of that ship;
(C) destroys a ship or causes damage to a ship or to its cargo which is likely to endanger the safe navigation of that ship;
(D) places or causes to be placed on a ship, by any means whatsoever, a device or substance which is likely to destroy that ship, or cause damage to that ship or its cargo which endangers or is likely to endanger the safe navigation of that ship;
(E) destroys or seriously damages maritime navigational facilities or seriously interferes with their operation, if such act is likely to endanger the safe navigation of a ship;
(F) communicates information, knowing the information to be false and under circumstances in which such information may reasonably be believed, thereby endangering the safe navigation of a ship;
(G) injures or kills any person in connection with the commission or the attempted commission of any of the offenses set forth in subparagraphs (A) through (F); or
(H) attempts or conspires to do any act prohibited under subparagraphs (A) through (G), shall be fined under this title, imprisoned not more than 20 years, or both; and if the death of any person results from conduct prohibited by this paragraph, shall be punished by death or imprisoned for any term of years or for life.
(2) Threat to navigation. - A person who threatens to do any act prohibited under paragraph (1)(B), (C) or (E), with apparent determination and will to carry the threat into execution, if the threatened act is likely to endanger the safe navigation of the ship in question, shall be fined under this title, imprisoned not more than 5 years, or both.
(b) Jurisdiction. - There is jurisdiction over the activity prohibited in subsection (a) - (1) in the case of a covered ship, if -
(A) such activity is committed -
(i) against or on board a ship flying the flag of the United States at the time the prohibited activity is committed;
(ii) in the United States; or
(iii) by a national of the United States or by a stateless person whose habitual residence is in the United States;
(B) during the commission of such activity, a national of the United States is seized, threatened, injured or killed; or
(C) the offender is later found in the United States after such activity is committed;
(2) in the case of a ship navigating or scheduled to navigate solely within the territorial sea or internal waters of a country other than the United States, if the offender is later found in the United States after such activity is committed; and
(3) in the case of any vessel, if such activity is committed in an attempt to compel the United States to do or abstain from doing any act.
(c) Bar To Prosecution. - It is a bar to Federal prosecution under subsection (a) for conduct that occurred within the United States that the conduct involved was during or in relation to a labor dispute, and such conduct is prohibited as a felony under the law of the State in which it was committed. For purposes of this section, the term "labor dispute" has the meaning set forth in section 2(c) (!1) of the Norris-LaGuardia Act, as amended (29 U.S.C. 113(c)).
(d) Delivery of Suspected Offender. - The master of a covered ship flying the flag of the United States who has reasonable grounds to believe that there is on board that ship any person who has committed an offense under Article 3 of the Convention for the Suppression of Unlawful Acts Against the Safety of Maritime Navigation may deliver such person to the authorities of a State Party to that Convention. Before delivering such person to the authorities of another country, the master shall notify in an appropriate manner the Attorney General of the United States of the alleged offense and await instructions from the Attorney General as to what action to take. When delivering the person to a country which is a State Party to the Convention, the master shall, whenever practicable, and if possible before entering the territorial sea of such country, notify the authorities of such country of the master's intention to deliver such person and the reasons therefor. If the master delivers such person, the master shall furnish to the authorities of such country the evidence in the master's possession that pertains to the alleged offense.
(e) Definitions. - In this section -
"covered ship" means a ship that is navigating or is scheduled to navigate into, through or from waters beyond the outer limit of the territorial sea of a single country or a lateral limit of that country's territorial sea with an adjacent country.
"national of the United States" has the meaning stated in section 101(a)(22) of the Immigration and Nationality Act (8 U.S.C. 1101(a)(22)).
"territorial sea of the United States" means all waters extending seaward to 12 nautical miles from the baselines of the United States determined in accordance with international law.
"ship" means a vessel of any type whatsoever not permanentlyattached to the sea-bed, including dynamically supported craft, submersibles or any other floating craft, but does not include a warship, a ship owned or operated by a government when being used as a naval auxiliary or for customs or police purposes, or a ship which has been withdrawn from navigation or laid up.
"United States", when used in a geographical sense, includes the Commonwealth of Puerto Rico, the Commonwealth of the Northern Mariana Islands and all territories and possessions of the United States.
The U.S. criminal code further provides: Whoever, on the high seas, commits the crime of piracy as defined by the law of nations, and is afterwards brought into or found in the shall be imprisoned for life. 18 U.S.C. 1651.