(Bloomberg) -- A Nigerian court convicted 10 men of piracy under a new law designed to thwart maritime crime in the Gulf of Guinea.

A federal judge in Lagos, Nigeria’s commercial hub, handed down 12-year prison sentences to the pirates, said Labaran Magaji, the prosecuting lawyer. The West African nation’s navy captured the men in May 2020 after they boarded a Chinese fishing vessel off the Ivory Coast and kidnapped the crew.

The verdict marks the first time pirates have been successfully prosecuted in Africa’s biggest crude producer under bespoke legislation enacted by President Muhammadu Buhari in 2019. Three private security company employees were fined under the law last year after being involved in an operation to deliver a ransom in exchange for abducted seafarers.

Nigerian waters are at the center of the Gulf of Guinea, a vast expanse of the Atlantic Ocean stretching from Senegal to Angola that’s the most dangerous part of the world for sailors, accounting for almost all kidnappings at sea in recent years. Nigeria was the first nation in the region to pass specialized legislation to punish those charged with piracy and other maritime crimes.

Rampant piracy centered around the Horn of Africa was curtailed about a decade ago in part by the imprisonment of more than 1,000 Somalis in countries such as Kenya and the Seychelles. A court in Togo jailed eight men for piracy in July after updating its penal code.

©2021 Bloomberg L.P.