Philippine President Rodrigo Duterte threatened Wednesday to impose martial law nationwide to combat the rising threat of terrorism, after Islamist militants beheaded a policeman and took Catholic hostages while rampaging through a southern city.
Duterte declared martial law on Tuesday for the southern region of Mindanao -- which makes up roughly one third of the country and is home to 20 million people -- in an immediate response to the attacks by the gunmen, who have pledged allegiance to the Islamic State group.
The roughly 100 militants roamed through Marawi city, killing five soldiers, taking a priest and an unspecified number of other people hostage from a church, setting fire to buildings and flying black IS flags, according to Duterte and his aides.
Duterte said they also beheaded a local police chief after capturing him at a road checkpoint they had set up, as he expressed outrage at what he called the growing threat from militants allied to IS in Mindanao.
"I will not hesitate to do anything and everything to protect and preserve the Filipino nation," the president said.
"I might declare martial law throughout the country to protect the people."
- Praise for a dictator -
Duterte, who has waged a controversial war on drugs that has claimed thousands of lives, warned martial law would be "harsh" and similar to military rule imposed by dictator Ferdinand Marcos a generation ago.
Marcos's two-decade rule ended in 1986 when millions of people took to the streets in a "People Power" revolution. Thousands of critics were jailed, tortured or killed during the dictatorship, according to historians and rights groups.
"Martial law of Mr Marcos was very good," Duterte said, as he railed against human rights campaigners and other critics of his drug war.
Duterte said his own version of martial law meant security forces could conduct searches and arrest people without warrants.
He also said there would be curfews for some provinces in Mindanao, and that martial law would remain until the terrorism threat had ended.
The fighting in Marawi erupted on Tuesday after security forces raided a house where they believed Isnilon Hapilon, a leader of the infamous Abu Sayyaf kidnap-for-ransom gang and Philippine head of IS, was hiding.
The United States regards Hapilon as one of the world's most dangerous terrorists, offering a bounty of $5 million for his capture.
The militants responded to the raid by burning buildings and conducting other diversionary tactics in Marawi, a mostly Muslim-populated city of 200,000 people, according to Defence Secretary Delfin Lorenzana.
Five soldiers and 13 militants were killed, national military spokesman Colonel Edgard Arevalo said on Wednesday night. However he said the bodies of only two militants had been recovered and the other reported deaths could not be independently verified.
The gunmen also raided a church in Marawi and took the local priest, Father Chito Suganob, plus an unspecified number of other people hostage, according to the head of the Catholic Bishops' Conference of the Philippines, Archbishop Socrates Villegas.
"They have threatened to kill the hostages if the government forces unleashed against them are not recalled," Villegas said in a statement.
- Thousands flee -
Thousands of residents fled Marawi, according to an AFP photographer at a military checkpoint near Iligan, the next biggest city about 40 kilometres (25 miles) away.
It was unclear on Wednesday night how many militants were still in the city or if they had escaped into nearby mountains and forests that they have long used as hideouts. There were no reports of major clashes on Wednesday.
The Abu Sayyaf, based on the most southerly islands of Mindanao, has kidnapped hundreds of Filipinos and foreigners since the early 1990s to extract ransoms.
Security analysts say Hapilon has been trying to unite Filipino militant groups behind IS. These include the Maute group, which is based near Marawi.
Separately, Muslim rebels have been waging a rebellion since the 1970s for an independent or autonomous homeland in Mindanao, with the conflict claiming more than 120,000 lives.
These main Muslim rebel groups are involved in peace talks with the government.
But the Abu Sayyaf, Maute and other hardline groups want to set up an Islamic caliphate in the south for IS, according to security analysts.