At least 31 people died and 230 were rescued after a fire engulfed a ferry in the southern Philippines, authorities said Thursday.

The Lady Mary Joy 3 was travelling from Zamboanga City on Mindanao Island to Jolo Island in Sulu province when the fire broke out late Wednesday, prompting passengers to jump overboard, disaster officer Nixon Alonzo said.

Rescuers, including the Philippine Coast Guard and fishermen, saved 195 passengers and 35 crew as the blaze ripped through the ferry off Baluk-Baluk Island in Basilan province.

An earlier death toll more than doubled after the discovery of 18 bodies on the vessel, Basilan Governor Jim Salliman told AFP.

The bodies were found inside an air-conditioned cabin during an ongoing search of the ferry.

"People panicked because they were asleep when the fire happened," said Commodore Rejard Marfe from the Philippine Coast Guard, citing witness accounts.

As the fire spread, the captain ran the vessel aground "so many more could survive since it would be easier to swim to shore," Marfe told AFP.

Authorities said earlier that 14 people were injured and seven were missing.

Salliman said there could be more people missing because the number of passengers on the vessel exceeded the 205 listed in the ship's manifest.

"Probably there are passengers who didn't register in the manifest," he said.

It was not clear how the fire started.

Survivors were taken to Zamboanga and Basilan where the injured received treatment for burns, Salliman said.

Photos released by the coast guard showed one of its vessels spraying water on the burning ferry as personnel in smaller boats plucked passengers from the dark waters.

The Philippines, an archipelago of more than 7,000 islands, is plagued by poor sea transport, with its badly regulated ferries prone to overcrowding and accidents.