Philippines President Rodrigo Duterte said he has ordered his troops to bomb extremists who flee with their captives in a bid to stop a wave of kidnappings at sea, calling the loss of civilian lives in such an attack "collateral damage."

Duterte has previously stated that he had told his Indonesian and Malaysian counterparts their forces can blast away as they pursue militants who abduct sailors in waters where the three countries converge and bring their kidnap victims to the southern Philippines. He said in a speech late Saturday that he had given the same orders to Filipino forces.

He said he instructed the navy and the coast guard that "if there are kidnappers and they're trying to escape, bomb them all."

"They say 'hostages.' Sorry, collateral damage," he said in a speech to businesspeople in Davao, his southern hometown.

He said such an approach would enable the government to get even with the ransom-seeking militants. "You can't gain mileage for your wrongdoing, I will really have you blasted," he said.

His advice to potential victims? "So, really, don't allow yourselves to be kidnapped."

Duterte's remarks reflect the alarm and desperation of the Philippines, along with Malaysia and Indonesia, in halting a series of ransom kidnappings, primarily by Abu Sayyaf militants and their allies, along a busy waterway for regional trade.

On Saturday, ransom-seeking Abu Sayyaf gunmen freed a South Korean captain and his Filipino crewman who were abducted three months ago from their cargo ship.

The gunmen handed skipper Park Chul-hong and Glenn Alindajao over to Moro National Liberation Front rebels, who turned them over to Philippine officials in southern Jolo town in predominantly Muslim Sulu province.

The Moro rebels, who signed a peace deal with the government in 2986, have helped negotiate the release of several hostages of the smaller but more violent Abu Sayyaf, which is blacklisted by the US as a terrorist organisation, and regularly carries out kidnappings, beheadings and bombings.

Duterte's adviser dealing with insurgents, Jesus Dureza, said he was not aware of any ransom being paid in exchange for the freedom of the sailors. At least 27 hostages, many of them foreign crewmen, remain in the hands of different Abu Sayyaf factions, he said.

There has been persistent speculation, however, that most of the freed hostages have been ransomed off.

Without a known foreign source of funds, Abu Sayyaf has survived mostly on ransom kidnappings, extortion and other acts of banditry.

A confidential Philippines government threat assessment report seen by The Associated Press last year said the militants pocketed at least 353 million pesos ($7.3 million) from ransom kidnappings in the first six months of 2016.

The militants have mostly targeted slow-moving tugboats in the busy sea bordering the southern Philippines, Malaysia and Indonesia.