But prosecutors said they were arrested after attacking the ship with automatic weapons and rockets.
Dutch authorities issued European arrest warrants for the five men three weeks after their arrest, and they were flown on a military plane from Bahrain in February last year to the Netherlands, where they have been in custody ever since.
Haroon Raza, a defence lawyer, told Al Jazeera he was dismayed at Thursday's verdict.
"I feel it is an incorrect verdict as far as the legal and human aspects are concerned," Raza said.
"We are going to appeal today. I believe the court will eventually come to a dismissal, or at least a reduction of the sentence.
"The Netherlands does not have jurisdiction in this case."
The five men are the first Somali pirates to stand trial in Europe.