President Rodrigo Duterte will lift martial law in the southern Philippines by year's end, his spokesman said Tuesday, more than two years after it was imposed in an attempt to stop the Islamic State group gaining a foothold there.

Duterte put the Mindanao region under military rule in May 2017, hours after gunmen flying the black IS flag seized the mainly Muslim city of Marawi, sparking a five-month battle that left 1,200 people dead.

"The (presidential) palace is confident on the capability of our security forces in maintaining the peace and security of Mindanao without extending martial law" beyond December 31, presidential spokesman Salvador Panelo said in a statement.

Duterte's security advisers had apprised him of the "weakening of the terrorist and extremist rebellion, a result of the capture or neutralisation of their leaders, as well as the decrease in the crime index," Panelo added.

Martial law had allowed the military to establish control with measures like curfews, checkpoints and gun controls in a nation where many civilians own firearms, either legally or illegally.

Suspects could also be detained for longer periods without criminal charges being filed in court.

However martial law is a contentious issue in a country ruled for 20 years by the late deposed dictator Ferdinand Marcos, who Duterte has hailed as the greatest leader the Asian nation ever had.

Congress allowed Duterte to extend martial rule over the entire south after government forces recaptured Marawi, ignoring opposition warnings of a creep towards authoritarian rule.

British-based watchdog group International Alert said in a report earlier this year that martial rule has reduced conflict incidents in Mindanao by 30 percent in 2017 and 2018.

Martial law was imposed after jihadists seized the city of Marawi in May 2017, sparking a battle that lasted five months and claimed 1,200 lives
Martial law was imposed after jihadists seized the city of Marawi in May 2017, sparking a battle that lasted five months and claimed 1,200 lives AFP / Noel CELIS

The group's Asia peace and conflict policy adviser Francisco Lara told AFP the military checkpoints curtailed the transport of firearms, which led to fewer kidnappings and clan wars.

Mindanao has however been hit by a number of deadly suicide bombings in a worrying escalation of militancy driven by the IS influence in Southeast Asia.

These attacks included a January 2019 blast during Sunday mass at a Catholic cathedral on the island of Jolo.

"The deterrence argument seems questionable in light of unprecedented suicide attacks," political analyst Richard Heydarian told AFP.

"Even after several years of implementation it did not bring any substantial defeat of any armed group in that area," added Jose Antonio Custodio, a military historian and defence analyst.

The tourism fallout was also substantial, Custodio added, citing frequent travel advisories for Mindanao issued by Western governments.

Defence Secretary Delfin Lorenzana earlier told reporters he had advised Duterte against prolonging martial rule over the region.

"It's time to go back to normal, and so that we can attract more investors," Lorenzana told government television last week.