The court in the southeastern coastal city of Mukalla convicted the group of hijacking a Yemeni fishing boat along with it crew, the judicial source told AFP.
“This is injustice. We shall appeal the verdict,” shouted one of the defendants from the dock, said a witness.
The defendants who were arrested by the Yemeni navy went on trial in August 2011.
Heavily armed pirates using high-powered speedboats have operated in the Gulf of Aden for several years, preying on ships and at times holding them for weeks before releasing them for large ransoms paid by governments or ship owners.
But the number of attacks has diminished since an international deployment of warships to patrol waters off the Horn of Africa.