A Malaysian court has sentenced the men behind the attack on a Malaysian-flagged products tanker to between 15 and 18 years in prison.

The eight Indonesians are alleged to have hijacked the 7,301-dwt Orkim Harmony (built 2009) on 11 June 2015.

Six of the pirates were sentenced to 15 years in jail, while the other two were handed 18-year jail sentences, a Malaysian Maritime Enforcement Agency official told AFP.

Noel Choong, head of the International Maritime Bureau’s Kuala Lumpur-based Piracy Reporting Center, said the shipping community hailed the punishment.

“We welcome the tough punishment. It will send a strong signal to potential pirates that crime does not pay,” he told AFP.

The men were extradited to Malaysian custody early on Sunday after being held by Vietnamese authorities for almost 18 months.

The Orkim Harmony lost communication with its owners in early June while en route from Malaysia's western coast to the port of Kuantan on the east coast.

The ship was reportedly carrying 5,879t of RON95 fuel worth MYR 21m ($5.5m) which belonged to state-owned oil company Petronas.

The ship also had a crew of 22 people made up of Indonesians, Malaysians and Myanmar nationals.

The eight suspects were caught by the Vietnamese authorities near Tho Chu Island in the south of Vietnam on 19 June while trying to escape in a lifeboat stolen from the tanker.

It was the second Orkim Ship Management-controlled vessel to have been attacked by pirates in the space of eight days.

The 7,119-dwt Orkim Victory (built 2009) was hijacked and had its cargo of fuel siphoned off and stolen in the early hours of 4 June 2015.