The six men have been held in a Spanish jail since November 2012 since being caught by Dutch sailors after they ambushed the Izurdia off the Horn of Africa using AK-47 rifles.
Spain's National Court, the country top criminal court, convicted the six of piracy and membership of a criminal group.
In its ruling the court said the six men formed "an assault cell or organized pirate group with material to board and kidnap commercial boats that sailed in the Indian Ocean off the coast of Somalia."
The court said they were part of an organization, based in Zimbabwe capital Harare, dedicated to enriching itself from assaulting and kidnapping boats in the Horn of Africa.
The court said the six armed men approached the Izurdia on a skiff on October 10, 2012 about 300 nautical miles off the Somali coast.
They aborted their attempted ambush after private security guards on board the Spanish trawler fired shots at them.
A Dutch navy ship taking part in the European Union's anti-piracy operation Atalanta detained them the following day and handed the six men over to Spanish authorities.
A Spanish court in 2013 convicted another six Somalis for piracy and sentenced them to between eight and 12 and a half years in jail for attacking a Spanish warship in 2012 off the coast of Somalia.
In 2011, two Somalis were sentenced in Spain to 439 years in jail each for seizing a Spanish tuna-fishing boat in 2009 and holding its 36 crew members for 47 days.
Under Spanish law, they will serve only a maximum of 30 years in jail, regardless of the sentence.
At the height of Somali pirate attacks in 2011, up to a dozen or more merchant ships were being held captive at any one time, often for multimillion-dollar ransoms.
Since then, growing use of private security details and the presence of international warships have largely prevented successful attacks.
Shipping companies, which in the past used larger and more costly teams and took expensive steps such as rerouting vessels and traveling at greater speed, were increasingly turning to smaller groups of armed personnel, the report said.
Somali pirates were increasingly attacking local fishermen and smaller craft, often hoping to use their vessels to attack larger ships.
In West Africa, tackling the attacks was complicated by the lack of regional cooperation and information sharing.
(AFP, Reuters, Al-Akhbar)