President Rodrigo Duterte is lifting martial law in the war-torn southern Philippine island of Mindanao, nearly three years after imposing the measure following a bloody siege by Muslim militants on its third largest city, Marawi.

Mr Duterte's spokesman Salvador Panelo told reporters yesterday the government "will not extend martial law in Mindanao upon its expiration on Dec 31, 2019".

Mindanao was placed under martial rule after about 1,000 Muslim militants, many from Indonesia and Malaysia, stormed Marawi on May 23, 2017, and held on to parts of it for five months in what became the Philippines' biggest security crisis in years.

By the time the military declared victory on Oct 23, more than 1,000 militants, government troops and civilians were dead, half of Marawi had been pulverised into rubble and dust, and about 400,000 people living in and near the city had been forced to flee their homes.

Mr Panelo said Mr Duterte agreed with his top security advisers that the militants were no longer a threat, with their senior leaders either killed or arrested.

Estimates by security officials of just how many Islamic State in Iraq and Syria (ISIS) fighters from abroad are still in the Philippines have been nebulous.

At the height of the Marawi battle, hundreds of foreign extremists were said to have fought alongside their local compatriots. After the bloody campaign, reports emerged that the number of foreign fighters in the war-torn southern Philippines was down to 100.

In July, Defence Secretary Delfin Lorenzana said only seven foreign fighters remained.

"The (government) is confident of the capability of our security forces in maintaining the peace and security of Mindanao without extending martial law," Mr Panelo said. He added that "contrary to the suppositions of the vocal minority on the proclamation of martial law in Mindanao, this decision of the President shows how he responds to the situation on the ground".

Related Story Terrorists from Sri Lanka slip into Philippines to prepare attacks

Related Story Foreign terrorists in Mindanao training suicide bombers: Philippine security officials

Mr Lorenzana last week said he had told Mr Duterte there was no need for martial law in Mindanao.

Brigadier-General Edgard Arevalo yesterday said the military had informed Mr Duterte it could handle the situation in Mindanao without martial law.

"We cited several reasons, like the improved security climate in Mindanao, the continued decline of Daesh-inspired local terrorist groups, and to further promote an environment more conducive to economic activities," he said, using the Arabic acronym for ISIS.

Mr Duterte had initially placed Mindanao under martial law for only 60 days, but later convinced Congress to extend it three times.

In his letter to Congress last year, he said extremists under the sway of ISIS continued to "defy the government by perpetrating hostile activities".

Over the past year, security forces have had to deal with a spate of suicide attacks that they said were prepped and carried out by militants from abroad.

In January, investigators said two Indonesians were involved in a suicide attack on a Roman Catholic cathedral in Sulu that killed 23 people and wounded at least 100.

Then, in June, a Filipino militant set off one of two bombs inside a temporary camp of a special army counter-terrorism unit in Indanan town, in Sulu province.

Three soldiers manning the camp's gate were killed, along with three civilians who were nearby.

A top United States counter-terrorism official last month said ISIS militants who fought in Syria and Iraq, and were defeated by US-backed forces, were not flocking to South-east Asia "in droves" even though there has been "a clear indication of an interest" among them to head to the region.

"We know the ISIS core, the remnants of ISIS in Syria, had been encouraging their fighters to leave and fight again, to take the fight to other regions," Mr Nathan Sales, who leads the US State Department's counter-terrorism bureau, told reporters in Manila.