MANILA (AFP, REUTERS) – Philippine lawmakers on Saturday (July 22) voted to retain martial law on the southern island of Mindanao until the end of the year, giving President Rodrigo Duterte more time to tackle armed extremists allied with the Islamic State in Iraq and Syria (ISIS) group.

Some 261 legislators agreed to extend military rule in a seven hour-long joint special session of the House of Representatives and the Senate, more than the required two-thirds of the house.

Security officials had told lawmakers that martial law was needed to stabilise a region where ISIS was gaining influence, and supporters could be inspired to stage uprisings in other areas of Mindanao, joined by foreign militants.

Defence Secretary Delfin Lorenzana warned of more serious problems if the government did not have the powers to act swiftly.

“We need martial law because we haven’t addressed yet the existence of other Daesh-inspired groups,” he said, referring to another name for ISIS.

Duterte placed Mindanao under martial law on May 23 when heavily-armed militants belonging to the Maute and Abu Sayyaf groups along with foreign fighters stormed Marawi City, sparking the biggest security crisis of his presidency.

The battle to liberate Marawi continues two months after, with more than 420 militants, 100 soldiers and 45 civilians killed. Some of those were executed by the rebels, according to the military.

Government troops pulverised and retook some of the Maute strongholds after weeks of artillery attacks and airstrikes, but an estimated 70 militants remained holed up in the downtown area.

“The rebellion in Marawi continues to persist and we want to stop the spread of the evil ideology of terrorism and free the people of Mindanao from the tyranny of lawlessness and violent extremism,” Presidential Spokesman Ernesto Abella said in a statement.

A slide presentation accompanying Duterte's martial law extension request, seen by AFP, compared the Marawi crisis to the ISIS takeover of the Iraqi city of Mosul. Marawi itself could now become a magnet for foreign fighters in Iraq and Syria, it said.

Most of the militants' leaders remain at large, the presentation added, while about 90 of the gunmen have slipped past security cordons and can link up with other armed groups in the region to mount similar widescale attacks.

At the hearing, defence and security officials justified the need for martial law, saying that aside from Marawi, Muslim militants were planning attacks in other parts of the southern Philippines.

They said almost a thousand pro-ISIS militants, holding 23 hostages, were still active elsewhere in the south.

In Marawi, the military said only about 60 gunmen were left in a 49-hectare (121-acre) area of Marawi, but Duterte said he needed martial law powers to rebuild the city and ensure the war did not spread elsewhere.

"I cannot afford to be complacent," Duterte told reporters Friday, adding the military would be conducting further "mopping up operations" even after they recapture Marawi. "If there is a spillage it will not be as bad if you have this stopgap," he added.

In an unprecedented move, both the House and the Senate met jointly on a weekend to vote on Duterte's request.

'Nationwide martial law'

Martial law allows the military to establish control with measures such as curfews, checkpoints and gun controls in a country where civilians are authorised to keep licensed firearms in their homes.

The subject remains sensitive in the Philippines, decades after the late dictator Ferdinand Marcos put the country under military rule for part of his 20-year term.

Thousands of critics, political opponents as well as communist guerrillas were killed, detained or arrested during the period, according to historians.

About a dozen protesters in the gallery interrupted Saturday's hearing, chanting "never again, never again to martial law" before being escorted out.

House Speaker Pantaleon Alvarez has said previously he sees no roadblock to the swift approval of the extension by both chambers of Congress.

Duterte had already beaten back a Supreme Court petition to declare martial law in Mindanao illegal.

But opposition politicians have criticised Duterte's proposal for an extension, with some alleging it is part of a Duterte plot to eventually bring the country under a military-backed dictatorship.

"Once he feels that there is not enough opposition to a nationwide martial law declaration, he will go for it," Senator Antonio Trillanes told AFP on Tuesday.

After this he could declare a revolutionary government to allow him to stay in office beyond his six-year electoral term in mid-2022, Trillanes says.

Duterte, 72, insists he has no plan to stay in office beyond his term.