Landslides and flooding killed 31 people as heavy rain from an approaching storm lashed the southern Philippines, a disaster official said Friday.

The storm unleashed flash floods carrying uprooted trees, rocks and mud overnight in mainly rural communities around Cotabato, a city of 300,000 people on Mindanao island.

Many residents were caught by surprise by the rapidly rising floodwaters, Naguib Sinarimbo, the spokesman and civil defence chief for the regional government, told AFP.

In this handout photo obtained from Regional Maritime Unit 12 - Sultan Kudarat Maritime Police Station Facebook page, rescuers help residents evacuate in Kalamansig, Sultan Kudarat on 28 October 2022, due to heavy rains resulting in floodings brought by Tropical Storm Nalgae.

"The water started entering the houses before dawn," Sinarimbo said, confirming that the death toll in the storm-hit areas had risen to 31 from the earlier tally of 13.

Rescuers retrieved 16 bodies from Datu Odin Sinsuat, 10 from Datu Blah Sinsuat and five from Upi town, he told reporters.

Teams in rubber boats had to rescue some residents from rooftops, Sinarimbo added.

Local filmmaker Remar Pablo told AFP he was shooting a beauty pageant in the town of Upi when the floodwaters suddenly came in after midnight and forced audience members to flee for safety.

A row of cars sat half-submerged on the street outside, his clips showed.

"We were stranded inside," said Pablo, who eventually waded into the water to get home.

Rescuers carried a baby in a plastic tub as they waded through chest-deep water, a photo posted by the provincial police showed.

'It was a shock' 

Floodwaters have receded in several areas, but Cotabato City remained almost entirely waterlogged.

Sinarimbo said there could be more flooding on Friday because of heavy rain.

"Our focus at this time is rescue as well as setting up community kitchens for the survivors," he said.

The army deployed its trucks to collect stranded residents in Cotabato and eight nearby towns, provincial civil defence chief Nasrullah Imam said.

Stranded passengers take a rest inside a gymnasium in Matnog town, Sorsogon province, south of manila on 28 October 2022, after authorities halted ferry service between Matnog Luzon island and Allen in Samar island, ahead of the landfall of Tropical Storm Nalgae.

"It was a shock to see municipalities which had never flooded getting hit this time," Imam said, adding that some families were swept away when the waters hit their homes.

The heavy rainfall began late Thursday in the impoverished region, which is under Muslim self-rule after decades of separatist armed rebellion.

The state weather office in Manila said it was partly caused by Tropical Storm Nalgae, which it expects to strengthen at landfall.

Nalgae was now heading toward the northern or central sections of the Philippines, with the state weather service saying it was not ruling out a landfall on Samar island later Friday, much earlier than earlier forecast.

Nearly 5,000 people were evacuated from flood- and landslide-prone communities in these areas, the civil defence office said.

The coast guard also suspended ferry services in much of the archipelago nation where tens of thousands of people board boats each day.

An average of 20 typhoons and storms strike the Philippines each year, killing people and livestock and destroying farms, houses, roads and bridges, although the south is rarely hit.

Scientists have warned that storms are becoming more powerful as the world gets warmer because of climate change.