"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.