CATANIA - An Italian court ruled Tuesday that the captain of a migrant boat that sank in 2015, killing up to 900 people, was responsible for the disaster, the Mediterranean's worst since World War II.

Judges in the Sicilian port city of Catania ordered Mohammed Ali Malek, a Tunisian national, to serve 18 years in jail for multiple manslaughter, human trafficking and causing the tragedy after the packed boat capsized after colliding with a freighter coming to its aid.

Syrian Mahmoud Bikhit, accused of being his first mate, was handed a five-year sentence for his role in the tragedy off the Libyan coast. Italian forensic scientists spent months sorting through decomposed body parts to count the victims.

The men were ordered to pay nine million euros ($9.5 million) each in compensation. Both had claimed they were simple migrants and had been made to steer the boat by the real traffickers. But survivors told investigators that Malek, who had lived in Italy in the past, was the captain. And that it was his lack of sailing skills that caused the deadly collision.

"I spent two years and six months in Italy and I have a young son with an Italian woman: I want to marry her and recognise the baby," Malek told the court in a plea before the verdict.