President Rodrigo Duterte has decided to end more than two years of martial law in the southern Philippines after government forces considerably weakened Islamic militant groups there with the capture and killing of their leaders, his spokesman said on Tuesday.

Mr Duterte placed the Mindanao region under martial law after hundreds of local militants aligned with the Islamic State group and backed by foreign fighters occupied buildings, a commercial district and communities in Marawi City starting 23 May, 2017, in the worst security crisis Mr Duterte has faced.

Troops quelled the disastrous siege after five months of intense airstrikes and ground offensives with the help of American and Australian surveillance aircraft, but congress approved an extension of martial law in Mindanao three times after Mr Duterte warned that militants continued to recruit fighters and plot attacks.

Mr Duterte decided not to further extend martial law, which expires at the end of the year, after his defence and security advisers provided an assessment that “the terrorist and extremist rebellion” has been weakened with the losses of the militants' leaders and a drop in crime in the region, presidential spokesman Salvador Panelo said.

“The palace is confident on the capability of our security forces in maintaining the peace and security of Mindanao without extending martial law,” Mr Panelo said in a statement. “The people of Mindanao are assured that any incipient major threat in the region would be nipped in the bud.”

Damage caused in Islamic State assault on Marawi city: In pictures Show all 10 1 /10 Damage caused in Islamic State assault on Marawi city: In pictures Damage caused in Islamic State assault on Marawi city: In pictures A bombed-out mosque stands in what was the main battle area in Marawi AFP/Getty Damage caused in Islamic State assault on Marawi city: In pictures Damaged buildings and houses Reuters Damage caused in Islamic State assault on Marawi city: In pictures Damaged vehicles are seen in Marawi city Reuters Damage caused in Islamic State assault on Marawi city: In pictures Damaged houses, buildings and a mosque Reuters Damage caused in Islamic State assault on Marawi city: In pictures A military vehicle drives past bombed-out buildings AFP/Getty Damage caused in Islamic State assault on Marawi city: In pictures Damaged houses, buildings and a mosque are seen inside Marawi city Reuters Damage caused in Islamic State assault on Marawi city: In pictures A graffiti that reads "I love ISIS" is seen in a damaged building in Marawi city Reuters Damage caused in Islamic State assault on Marawi city: In pictures Bombed-out buildings are seen as government troops board trucks AFP/Getty Damage caused in Islamic State assault on Marawi city: In pictures Damaged buildings and houses Reuters Damage caused in Islamic State assault on Marawi city: In pictures Military trucks drive past destroyed buildings and a mosque AFP/Getty

Defence secretary Delfin Lorenzana has told Mr Duterte that Muslim militants can no longer carry out an attack like the siege on Marawi, which left more than 1,000 mostly militants dead, along with troops and civilians, and turned the mosque-studded city's commercial and residential areas into a wasteland of burned and pock-marked buildings and houses.

Troops have also made significant progress in efforts to defeat the decades-old communist insurgency in the region, Mr Lorenzana said.

The attack reinforced fears that the Islamic State group was gaining a foothold in in southeast Asia despite its battle defeats in Iraq and Syria.

Opposition politicians argued Mr Duterte's martial law was unconstitutional because it is an “extreme measure” that can only be imposed when an actual rebellion against the government exists. They also feared the move could be a prelude for Mr Duterte to declare martial law throughout the Philippines.

Foreign governments have also expressed concern, but Mr Lorenzana said the martial law imposed in Mindanao was “mild” compared to the state of martial rule declared by authoritarian leader Ferdinand Marcos in the Philippines in the 1970s. The Marcos-era martial law was characterised by widespread human rights violations and alleged plunder of state coffers.

Mr Lorenzana said businessmen were reluctant to invest in the south because of martial law.

Suicide bombings by Islamic State group-linked militants have rocked the southern province of Sulu this year, including the first one staged by a Filipino militant, but Mr Lorenzana expressed confidence that government forces “can maintain the peace and order there and improve it further, make it more peaceful, without martial law.”