With ultra-fast boats, millions in ransom payments and sympathetic locals, pro-Islamic State militants on lawless southern Philippines islands who beheaded a German hostage this week have re-emerged as one of the nations top threats.
The Philippines is planning to bring in foreign maritime forces to help fight the Abu Sayyaf, after a kidnapping spree that has raised fears the waters around its island strongholds may descend into a Somalia-like haven for pirates.
Declarations by key leaders of the Abu Sayyaf, a loose network of militants backed by local criminals and corrupt officials, of allegiance to the Islamic State group have further stoked alarm.
"The nation's problem, the biggest threat, I would say, in the coming years it would be terrorism. It's sure to come,"President Rodrigo Duterte said recently.
In an interview with AFP in February, Defence Secretary Delfin Lorenzana listed the Abu Sayyaf and other "terrorist" groups that have pledged allegiance to IS as the Philippines' top internal security threat.
"We are trying to put more effort into suppressing the growth of ISIS in the south," Lorenzana said.
Over the past two years the Abu Sayyaf has been involved in kidnapping dozens of people in increasingly brazen attacks mostly on foreign cargo vessels, but also on coastal tourist resorts in the south and neighbouring Malaysia.
The militants on Monday posted a video online of them beheading Jurgen Kantner, a 70-year-old German sailor who was abducted from his yacht in southern Philippine waters three months earlier.
They killed him after a demand for a ransom of 30 million pesos ($600,000) was not met.
Two Canadian hostages kidnapped from yachts moored at a marina on a tourist island in the southern Philippines in 2015 were also beheaded last year after demands for ransoms of similar amounts went unfulfilled.
The Abu Sayyaf is holding 19 other foreigners on its remote southern island strongholds of Sulu and Basilan, according to the military.
Most of them are Vietnamese, Indonesian and Malaysia sailors abducted from cargo vessels in or near the Sulu and Celebes seas.
To counter, the Philippines has said it is looking to Chinese and American forces to help patrol waters in the area, which also includes a busy international shipping channel called the Sibutu Passage.
Separately, the Philippines is in talks with Malaysia and Indonesia for joint patrols.
In his interview with AFP, Lorenzana said the Philippine naval and coast guard vessels could do little to catch the pirates' boats, which travelled at speeds of more than 80 kilometres (50 miles) an hour.
"The Abu Sayyaf has better boats than us," Lorenzana said.
The Abu Sayyaf's spike as a kidnapping threat can be traced back to two events in 2014, according to security analysts.
One was the winding back of a US military programme to train Philippine forces on how to counter the Abu Sayyaf, and provide intelligence. The programme saw a rotating force of about 600 troops stationed in the south.
It ended in June 2014 after local Islamic extremists had "largely devolved into disorganised groups", according to a US government statement at the time.
Previously the Abu Sayyaf was regarded as a much bigger threat. It was accused of involvement in the 2004 bombing of a ferry in Manila that killed more than 100 people and other deadly attacks, as well as high-profile kidnappings.
During the 12 years of the American presence the Abu Sayyaf's numbers were cut from more than 1,000 to about 300, according to Philippine military estimates then, and many of its top leaders were killed or detained.
"The departure of the US advisers led to a steady resurgence of the ASG (Abu Sayyaf) and eventually the emergence of two dozen IS-centric groups,"Rohan Gunaratna, a Singapore-based regional terrorism expert, told AFP on Tuesday.
Also in 2014 the Abu Sayyaf had one of their biggest paydays ever, claiming to have secured the full ransom of more than $5 million dollars for releasing two German sailors kidnapped that year.
That, and subsequent paydays worth hundreds of thousands of dollars, enabled the kidnappers to buy better weapons and boats, as well as pay local Muslim communities that harbour and protect them, according to analysts.
"The community celebrates when there's delivery of ransom. They kill cows, goats in festivity,"Rommel Banlaoi, chairman of the Philippine Institute for Peace, Violence and Terrorism Research in Manila, told AFP.
Banlaoi and other analysts said corrupt politicians and security forces were also involved, getting a share of payouts and ensuring the Abu Sayyaf survived military offensives.
"It's really organised crime," Banlaoi said.