Philippine President Rodrigo Duterte declares martial law on the island of Mindanao after deadly clashes between militants and troops.

Militants allied to Isis have rampaged through a southern Philippine town, beheading a local police chief and kidnapping a priest and 10 parishioners, as more firefights broke out and buildings were set ablaze on Thursday.

Violence that erupted on Tuesday in Marawi, 830 kilometres south of Manila, has left at least 21 dead, 13 of them militants, and dozens wounded.

The militants have threatened to kill Father Chito Suganog and other hostages who were saying prayers when fighters stormed into St Mary's Cathedral in the town and took them as human shields.

ROMEO RANOCO/REUTERS Government troops are seen during their assault with insurgents from the Isis-affiliated group in the Philippines' south.

Majul Gandamra, the town's mayor, told journalists that militants were still holed up in some buildings, surrounded by soldiers.

READ MORE:

* Philippine church says priest, churchgoers taken hostage by IS militants

* Defiant Duterte threatens harsh measures as thousands flee Philippines unrest

* Philippine troops clash with Muslim rebels; 23 killed, 73 hurt

* Philippine President Rodrigo Duterte to use troops in drug war

* Donald Trump praises Duterte for an 'unbelievable job' on drug issue

* 'Be ready to fight': Philippine leader Rodrigo Duterte scraps truce



"They are not shooting at anyone specifically," he said, adding they were posting images on social media.

ROMEO RANOCO/REUTERS Residents run to evacuate during government troops assault with insurgents from the so-called Maute militants, who have taken over large parts of the Marawi city, southern Philippines.

Philippine Defence Secretary Delfin Lorenzana warned residents of the town with a population of 200,000 to stay indoors on Thursday, saying top militant commander Isnilon Hapilon may still be hiding there, citing "latest reports".

Witnesses reported loud explosions in the town on Thursday as several military helicopters hovered overhead.

Philippine President Rodrigo Duterte, who threatened to impose nation-wide martial law to combat the rising threat of terrorism, said the beheaded police chief was on his way home when militants stopped him at a checkpoint.

ERIK DE CASTRO/REUTERS Philippine President Rodrigo Duterte said the beheaded police chief was on his way home when militants stopped him at a checkpoint.

"I think they decapitated him right there and then," he told a news conference in Manila after cutting short a trip to Moscow as the violence raged in Marawi, a provincial capital with a population of 200,000.

Duterte pledged that martial law he declared late on Tuesday across the southern region of Mindanao – which makes up roughly one-third of the country and is home to 20 million people – would be "harsh".

"If I think you should die, you will die. If there's open defiance, you will die and if it means many people dying, so be it. That is how it is," said the president, a former mayor of the Mindanao city of Davao.

ROMEO RANOCO/REUTERS Insurgents from the so-called Maute group have taken over large parts of the Marawi city, southern Philippines.

"I will not hesitate to do anything and everything to protect and preserve the Filipino nation," he said. "I might declare martial law throughout the whole country to protect the people."

The occupation of Marawi by at least 100 heavily armed militants from the little-known Maute group has intensified fears that the Philippines faces a growing threat from Isis, which claimed responsibility for the rampage via its Amaq propaganda arm.

Australian Foreign Minister Julie Bishop has warned of the possibility of Islamic State declaring a "caliphate" in the southern Philippines as extremists are forced out of the Middle East.

- With agencies