NAIROBI, Kenya (AP) — A Kenyan court has convicted and sentenced seven Somalis of piracy to five years in jail, a defense lawyer said Tuesday.

A court in the Kenyan port town of Mombasa found the Somalis guilty of attacking a German naval supply ship in the Gulf of Aden on March 29 last year, said Jared Magolo, their lawyer. He said his clients plan to appeal the verdict made Monday.

"Even though we believe that the verdict was not very heavy, but the conviction was not proper," said Magolo.

The European Union anti-piracy task force said it welcomes the court's decision.

The "judgment marks an important step in the cooperation between EU and Kenya in the repression of acts of piracy and armed robbery off the coast of Somalia," said Maj. Gen. Buster Howes, the force's operation commander.

Riding in a single skiff, the seven pirates opened fire on the FGS Spessart, a German Navy tanker, mistaking it for a commercial vessel. They were repelled by ship's security and later captured by the German frigate FGS Rheinland-Pfalz. The pirates were handed over to Kenyan authorities in April last year.

Before Monday, Kenyan courts had convicted 28 Somalis of piracy since 2006, when the first piracy case was concluded in the East African nation.

Somalia has been mired in anarchy and chaos since 1991, and the lawlessness has allowed piracy to thrive off its Indian Ocean and Gulf of Aden coastlines. Somali pirates are able to make multimillion dollar ransoms from their hijackings.