Two months after Islamist militants launched an assault on one of the biggest southern cities in the Philippines, the fighting is dragging on, and President Rodrigo Duterte says he is prepared to wait for a year for it to end.

The defence top brass admits it underestimated its enemy and is struggling to finish off the highly organised, pro-Islamic State fighters who swept through Marawi City on May 23 and have held parts of it despite sustained ground attacks by hundreds of soldiers and daily pummelling by planes and artillery.

On Saturday, lawmakers approved Duterte's request to extend martial law to the end of the year on the island of Mindanao, granting greater powers to security forces to go after extremists with a reach that goes far beyond Marawi.

But it remains unclear how exactly Duterte plans to tackle extremism after troops retake Marawi, where about 70 militants remain holed up in the debris of what was once a flourishing commercial district, along with many civilian hostages.

More than 500 people have been killed, including 45 civilians and 105 government troops. After missing several self-imposed deadlines to re-take the city, the military says its options are limited because of the hostages.

Duterte has said he had asked to military to avoid more civilian casualties.

"I told them 'do not attack'. What's important is we do not want to kill people," he said on Friday. "If we have to wait there for one year, let us wait for one year."

The southern Philippines has been marred for decades by insurgency and banditry. But the intensity of the battle in Marawi and the presence of foreign fighters fighting alongside local militants has raised concerns that the region may be becoming a Southeast Asian hub for Islamic State as it loses ground in Iraq and Syria.

Militants from neighbouring Malaysia and Indonesia, both Muslim-majority nations, are fighting in Marawi.

About 5 million Muslims live in the Catholic-majority Philippines, mostly on Mindanao. Defence Secretary Delfin Lorenzana indicated on Saturday that after Marawi, the government would strengthen surveillance in the region, widening the net to detect rebel training camps and movements of militants.

"We need communications equipment, high-tech communications equipment that we can use to monitor cellphones of the enemies. We also need drones," he told Congress.

OVERHAUL

Security experts say the government needs a strategic overhaul after failing to act on warnings long ago that radical ideology was taking hold in Mindanao, and luring foreign fighters unable to join Islamic State in Syria and Iraq.

"Things have changed dramatically ... our country must pursue some paradigm shifts," said analyst and retired police intelligence officer Rodolfo Mendoza.

"We have to counter the spread of terrorism not only by supporting use of intelligence or counter intelligence, but tackling the root causes."

The Marawi assault was planned and executed by a relatively new group, Dawla Islamiya, better known as the Maute Group, which wants recognition from Islamic State as its regional affiliate.

Led by two brothers, the Maute Group want a "Wilayah", or province of Islamic State, in Lanao del Sur province, where it has engaged in fierce, days-long battles with the military since 2016, each time suffering heavy losses before regrouping months later.

The brothers, Abdullah and Omarkhayam Maute, have been joined by Isnilon Hapilon, the anointed Southeast Asian "Emir" of Islamic State and leader of a faction of another Mindanao group, Abu Sayyaf.

The Marawi fighting has been much publicised across militant networks and experts say it could attract more fighters to the region.

"It has inspired young extremists from around the region to want to join," the Institute for Policy Analysis of Conflict said in a report on Friday, adding the fighting had "lifted the prestige of the Philippine fighters in the eyes of ISIS Central".

Richard Javad Heydarian, a political science professor at Manila's De La Salle University, said the military should seek to neutralise the Maute brothers to buy time to disrupt recruitment and stop fighters regrouping.

Moderate separatist groups from Mindanao should be co-opted to counter the extremist message, he said, while the military should work closer with the United States and Australia, which have provided operational advice and surveillance planes.

The Marawi crisis erupted not because of intelligence failures, but the policy priorities of Duterte, Heydarian added.

He said Duterte, who came to power a year ago, channelled security resources into a war on drugs instead of countering Islamic radicalisation in the south, an issue the president himself has himself flagged in the past.

"They were all aware of this. It was just a matter of time," Heydarian said.