Thousands of civilians are fleeing fighting in the Philippines as troops try to fend off Islamist militants who took over large parts of a city, capturing Christians, seizing and torching buildings and setting free scores of prisoners.
Isis (Islamic State) claimed responsibility for the rampage via its Amaq news agency, and President Rodrigo Duterte defended his decision to declare martial law on Mindanao, the Muslim-majority island where Marawi City is located, to prevent the spread of extremism in the impoverished region.
The violence flared in Marawi on Tuesday after a botched raid by security forces on a hideout of the Maute, a militant group that has pledged allegiance to Isis.
Fighters quickly dispersed, torching buildings and taking over bridges, a hospital, two jails, a church and a college. Duterte said he heard reports they may have beheaded a police chief.
He said Isis must be repelled from the Christian-majority Philippines and he would use all means possible to crush the Maute group and the allied Abu Sayyaf, whatever the consequences.
"Anyone now holding a gun, confronting government with violence, my orders are spare no one, let us solve the problems of Mindanao once and for all," said Duterte, who is from the island, after cutting short a visit to Russia and returning to Manila.
"If I think you should die, you will die. If you fight us, you will die. If there's an open defiance, you will die, and if it means many people dying, so be it. That's how it is."
Soldiers and guerrillas set up rival checkpoints and roadblocks on routes in and around Marawi as civilians fled the city of 200,000 in droves, leaving behind what one official described as a ghost town.
Long queues of pickup trucks and jeeps crammed full of people and loaded with belongings crawled along roads into nearby towns as troops searched vehicles for weapons and bombs.
The military said it had rescued 120 people from a school and a hospital and was trying to isolate Maute fighters while awaiting reinforcements that were being blocked by rebels.
The Catholic church said militants were using Christians and a priest as human shields and had contacted cardinals with threats to execute hostages unless government troops withdrew.