MANILA - President Rodrigo Duterte on Friday invited local terrorists to talks as he attempted to quell violence in Marawi City, where government troops and Islamist rebels have been engaged in sporadic fighting since Tuesday.

Duterte, who had placed Mindanao under martial to stop the rebellion, said he was willing to talk to local terrorists if they would lay down their arms.

“My message mainly to the terrorists on the other side is kung madala pa natin ito ng usapan. Iyung talagang out na out na terorista na. If you cannot be convinced to stop fighting, so be it, away na lang tayo,” Duterte told soldiers from the 2nd Mechanized Infantry Brigade in Iligan City.

“If they want to talk, I would be most thankful to Allah na mag-usap tayo ng kapayapaan. Kung maglaban sila, wala tayong magawa, go for it at may full support kayo sa akin,” Duterte told the troops about to deploy to the conflict area.

Duterte placed Mindanao under martial law after local terrorist groups Maute and Abu Sayyaf, apparently aided by foreign terrorists, besieged Marawi City.

The president also suspended the privilege of writ of habeas corpus, which means anyone charged with rebellion or invasion can be arrested without a court-issued warrant.

Sporadic clashes in the city erupted as government troops were trying to arrest Abu Sayyaf leader Isnilon Hapilon, said to be the anointed leader of the Islamic State in Southeast Asia. Hapilon has a $5-million bounty on his head.

In explaining his declaration to Congress, Duterte said the local terror groups were planning to create an Islamic province in Mindanao.

In his speech, Duterte, who takes pride of his Maranao roots, said it pained him to order an offensive against the terrorists.

“We are in a conflict. It is not a war, but this is a festering — parang sugat na ayaw gumaling, it sticks everyday, and it finally came to a head,” he said.

“And much as I really hate to order an offensive against the Maute and [the] rest of [the] terrorists, mapipilitan akong mag-martial law because of the so many factors involved.”

At least 31 suspected terrorists, six of whom were reportedly foreigners, have been killed since violence erupted Tuesday.