Kuala Lumpur: A passenger ferry with 58 people onboard caught fire just minutes after it set sail from a popular Malaysian resort island on Monday but all were rescued unharmed, police said.

The fire broke out shortly after the ferry left the town of Kuah on Langkawi island for the one-hour journey to Kuala Perlis on the mainland, Langkawi police chief Mohammad Iqbal Ebrahim told AFP.

It's the first time in almost 20 years that a ferry serving the route had caught fire

- Mohammad Iqbal Ebrahim, Langkawi police chief, on a ferry from which 58 were rescued in Langkawi

Ebrahim said the fire spread quickly from the rear of the ferry but five nearby fishing boats and some tourist vessels came alongside the burning vessel to help evacuate the 52 passengers and six crew to safety.

A video that has gone viral showed some of the impromptu rescuers urging the stricken ferry passengers into their small boat as clouds of thick black smoke billow into the blue sky and the sounds of women crying can be heard.

Some passengers were seen throwing their luggage into the sea in their haste to escape the ferry, the local police chief said.

The jungle-clad island of Langkawi, whose lawmaker is Prime Minister Mahathir Mohammad, is located in northwest Malaysia and attracts millions of tourists to its pristine beaches every year.

Ebrahim said authorities have launched a probe into the cause of the fire which destroyed almost 80 per cent of the ferry.

It is the first time in almost 20 years that a ferry serving the route had caught fire, he added.