The Philippines has mobilised attack helicopters and special forces to drive Islamic State-linked rebels out of a besieged southern city, with six soldiers killed in street combat amid heavy resistance.
Ground troops hid behind walls and armoured vehicles and exchanged volleys of gunfire with Maute group fighters, shooting into elevated positions occupied by militants who have held Marawi City for two days.
Helicopters circled the city, peppering Maute positions with machine gun fire to try to force them from a bridge vital to retaking Marawi, a mainly Muslim city of 200,000 where fighters had torched and seized a school, a jail and a cathedral, and took more than a dozen hostages.
"Our troops are doing deliberate operations in areas we believe are still occupied or infested with the terrorist presence," said the head of the task force, Brigadier General Rolly Bautista.
The battles with the Maute group, which has pledged allegiance to Islamic State, started on Tuesday during a failed raid by security forces on one of the group's hideouts that spiralled into chaos.
Eighteen rebels were killed on Thursday, the army said.
The turmoil was the final straw for President Rodrigo Duterte, who on Tuesday delivered on his longstanding threat to impose martial law on Mindanao, the country's second-largest island, to stop the spread of radical Islam.
"If there's an open defiance you will die," he said on Wednesday. "And if it means many people dying, so be it."
Islamic State claimed responsibility late on Wednesday for Maute's activities via its Amaq news agency.
At least 46 people - 15 security forces and 31 rebels - have been killed and religious leaders say militants were using Christians taken hostage during the fighting as human shields. The status of those hostages was not known.
The White House condemned the Maute group as "cowardly terrorists" and said the United States was a proud ally of the Philippines and backed its fight against extremism.
Hundreds of civilians had sheltered in a military camp in Marawi City as troops helped clear the few remaining people from streets where smoke lingered in the air.
"We're leaving," said a resident named Edith, walking along a rundown street carrying a small suitcase. "We can no longer take it and we need to save our children."