Russian President Vladimir Putin, right, shakes hands with Philippine President Rodrigo Duterte during their meeting at the Kremlin in Moscow. Photo/AP
Islamic State group-linked militants swept through a southern Philippine city, beheading a police chief, burning buildings and seizing a Catholic priest and his worshippers.
President Rodrigo Duterte, declared martial law across a third of the nation as militants raised the IS flag.
The firebrand leader also warned he may expand it nationwide after 21 people died in clashes between militants and government forces in the southern city of Marawi.
Duterte met with Russian President Vladimir Putin on Tuesday and said he is counting on Russia to supply weapons to the Philippines to fight terrorism.
"Of course, our country needs modern weapons, we had orders in the United States, but now the situation there is not very smooth and in order to fight the Islamic State, with their units and factions, we need modern weapons," he said, according to Russian state news agency Tass.
His Russian counterpart has also faced mounting criticism from human rights groups on issues including gay rights and a government crackdown on dissidents.
As details of the attack in Marawi city emerged, fears grew that the largest Roman Catholic nation in Asia could be falling into a growing list of countries grappling with the spread of influence from the Islamic State group in Syria and Iraq.
The violence in Marawi erupted on Tuesday after the army raided the hide-out of Isnilon Hapilon, a commander of the Abu Sayyaf militant group who has pledged allegiance to IS.
He is on Washington's list of most-wanted terrorists with a $5 million reward for information leading to his capture.
The militants called for reinforcements and around 100 gunmen entered Marawi, a mostly Muslim city of 200,000 people on the southern island of Mindanao, Defense Secretary Delfin Lorenzana said.
"We are in a state of emergency," Duterte said after cutting short a trip to Moscow to fly back to Manila.
"I have a serious problem in Mindanao and the ISIS footprints are everywhere."
He declared martial rule for 60 days in the entire Mindanao region - home to 22 million people - and vowed to be "harsh."
"If I think that you should die, you will die," he said.
"If you fight us, you will die. If there is open defiance, you will die. And if it means many people dying, so be it."
But the President said he would not allow abuses and that law-abiding citizens had nothing to fear.
Duterte said a local police chief was stopped at a militant checkpoint and beheaded, and added that he may declare martial law nationwide if he believes the group has taken a foothold.
Marawi Bishop Edwin de la Pena said the militants forced their way into the Marawi Cathedral and seized a Catholic priest, 10 worshippers and three church workers.
The priest, Father Chito, and the others had no role in the conflict, said Archbishop Socrates Villegas, president of the Catholic Bishops Conference of the Philippines.
"He was not a combatant. He was not bearing arms. He was a threat to none," Villegas said of Chito.
"His capture and that of his companions violates every norm of civilised conflict." Villegas said the gunmen are demanding the government recall its forces.
Military spokesman Colonel Edgard Arevalo said 13 militants had been killed, and that five soldiers had died and 31 others were wounded.
Other officials said a security guard and two policemen were also killed, including the beheaded police chief.
Arevalo said troops had cleared militants from a hospital, the city hall and Mindanao State University. About 120 civilians were rescued from the hospital, the military said.
Thousands of people have fled the city, said Myrna Jo Henry, an emergency response official. She quoted another official as saying Marawi was like "a ghost town."
Broadcaster ABS-CBN showed people crammed inside and on top of public vehicles leaving the area, and some walking on foot with their belongings as they passed through a security checkpoint manned by soldiers.
Martial law allows Duterte to use the armed forces to carry out arrests, searches and detentions more rapidly.
He has repeatedly threatened to place the south, the scene of decades-long Muslim separatist uprisings, under martial law.
But human rights groups have expressed fears that martial law powers could further embolden Duterte, whom they have accused of allowing extrajudicial killings of thousands of people in his crackdown on illegal drugs.
Hapilon, an Arabic-speaking Islamic preacher known for his expertise in commando assaults, pledged allegiance to the Islamic State group in 2014.
He is a commander of the Abu Sayyaf militant group and was wounded by a military air strike in January.
Troops sealed off major entry and exit points to prevent Hapilon from escaping, military chief of staff Gen. Eduardo Ano told The Associated Press late Tuesday.
"We will conduct house-to-house clearing and do everything to remove the threat there. We can do that easily," Ano said, but added it was more difficult in an urban setting because of the need to avoid civilian casualties.
He said the group erected Islamic State flags at several locations. Provincial Vice Governor Mamintal Adiong said late on Wednesday that more troops had arrived in the city, which was dark because 80 per cent was without electrical power.
"Hopefully, the military will be able to control the situation in Marawi city by tomorrow," he said.
While pursuing peace talks with two large Muslim rebel groups in the south, Duterte has ordered the military to destroy smaller extremist groups which have tried to align with the Islamic State group.
At least one of those smaller groups, the Maute, was involved in the Marawi siege. It's one of less than a dozen new armed Muslim groups that have pledged allegiance to the Islamic State and formed a loose alliance, with Hapilon reportedly designated as the alliance's leader.
Political analyst Ramon Casiple said the Maute is a clan-based group with members in Marawi who came to Hapnilon's assistance, with some directly assisting in the fighting and others fanning out to different parts of the city, setting up checkpoints and burning some buildings and taking hostages from the cathedral.
"It is difficult to root out because they are from there," he said.
"The Mautes are embedded in the population." The group has been blamed for a bombing that killed 15 people in southern Davao city, Duterte's hometown, last September and a number of attacks on government forces in Lanao, although it has faced setbacks from a series of military offensives.
Last month, troops backed by air strikes killed dozens of Maute militants and captured their jungle camp near Lanao del Sur's Piagapo town.
Troops found homemade bombs, grenades, combat uniforms and passports of suspected Indonesian militants in the camp, the military said.