The Somalis - some as young as 15 years old - are suspected of taking 23 Filipino crew members captive aboard a chemical tanker on Jan. 20. Malaysian naval commandos responsible for protecting the vessel stormed it less than two hours later and freed the crew. The pirates shot at the commandos, but no injuries were reported.
The Somalis were brought to Malaysia, where government lawyers on Friday charged them with using firearms against Malaysian armed forces personnel with the intention of causing death or hurt.
The charge carries a penalty of death by hanging, but prosecutors said that if convicted, three of the Somalis are expected to have their sentences commuted to prison terms because they are minors.
The Somalis looked grim while handcuffed behind their backs and wearing bright orange overalls at the Kuala Lumpur Magistrate's Court. They did not immediately enter any plea. The court scheduled a preliminary hearing March 15.
"The fact that we charged them (means) we have a good case," prosecutor Mohamad Abazafree Abbas said.
South Korea and India also are holding dozens of pirate suspects expected to be charged soon. South Korean authorities have said five captured Somalis could face up to life imprisonment for hijacking a ship last month, requesting a ransom and attempting to kill the captain.
The efforts to prosecute suspects signal a tougher stance among countries fed up with persistent piracy off the coast of Somalia - which includes one of the world's busiest shipping lanes. Sea attacks have been rampant since the Horn of Africa nation's government collapsed in 1991.
Many suspected pirates detained by navies are released after being disarmed because some nations are reluctant to bear the cost of putting them on trial and imprisoning them, while others fear that suspects might seek to claim asylum.
"We commend the Malaysian government's decision to prosecute the pirates," said Noel Choong, who heads the International Maritime Bureau's piracy reporting center in Kuala Lumpur.
The charges would show Somali pirates that the international community is becoming more serious about ending the problem, Choong said.
The United States and Germany have also prosecuted pirates in the past year. In November, a jury in Virginia convicted five Somali men of piracy for their attack on a U.S. Navy ship. They face mandatory life terms at a sentencing hearing set for March.
However, most officials say the real solution lies in creating peace and stability in Somalia.
Piracy has also risen around Nigeria. On Thursday, pirates off the coast of Nigeria's commercial capital of Lagos attacked a chemical tanker but failed to board it, according to the International Maritime Bureau. Separately, Greek officials said Friday that pirates in Nigeria freed two merchant navy officers kidnapped from a Greek-managed cargo ship last month.
Associated Press writers Sean Yoong in Kuala Lumpur, Jon Gambrell in Lagos and Elena Becatoros in Athens contributed to this report.