Madrid: A Spanish court on Wednesday sentenced two Somali pirates to rigorous imprisonment of 439 years each for their role in hijacking the country’s fishing trawler with its crew in October 2009.

Under Spanish law, the two will serve maximum 30 years in jail, regardless of the total sentence handed down by the court.

The two, Abdou Willy and Raagegeesey Adji Hamanwere, were arrested by Spanish marines as they left the captured trawler two days after the hijacking off the coast of Somalia and flown to Spain where they have been held in a Madrid jail.

Spain's National Court found them guilty on 36 counts of illegal detention and robbery with violence but acquitted them of the charges of terrorism, membership in an organised crime group and torture.

The court also ordered each of them to pay 100,000 euros to each of those detained.

During their trial, Willy and Hamanwere had said that they had been fishing in the area and were themselves seized by the pirates who then hijacked the Spanish fishing trawler.

The 36-member crew of the Alakrana, which included 16 Spanish nationals, spent 47 days in captivity before they were released.

The pirates who seized the boat said they received a ransom of USD 4.0 million (2.7 million euros).