11 people have been sentenced to life imprisonment for piracy by a court in the autonomous Somali region of Puntland.
Seven were caught during a raid last week while the other four were detained for collaborating with the pirates.
The court found them guilty of taking people hostage with the aim of obtaining a ransom.
Most of the 11 had been detained during an operation by the Puntland security forces against pirates who had seized a boat from the United Arab Emirates and contracted by a Somali businessman.
The tough sentences come as piracy in Somalia's waters attracts renewed international attention following the capture of several foreign ships.
An Irish engineer was held hostage by pirates off the coast of Somalia earlier this year. He was part of the crew of a tugboat that was released in March after being held for 46 days.
A Spanish trawler was released Saturday after being held for a week.
On 11 April, pirates also released a French luxury cruise yacht and its 30-strong crew but the French military followed up the ransom with a raid and captured six suspected pirates who are now awaiting trial in France.
The coastal waters off Somalia are considered to be among the most dangerous waterways for shipping in the world.
Last year more than 25 ships were seized by pirates in Somali coastal waters despite US navy patrols.