President Rodrigo Duterte imposed martial law across the southern third of the Philippines shortly after the fighting erupted, warning the gunmen were involved in an effort by the Islamic State group to set up a local caliphate.
But street-to-street battles and a relentless military bombing campaign has so far failed to end the crisis in Marawi, one of the biggest Muslim cities in the mainly Catholic Philippines, and authorities expressed alarm about the fate of those trapped.
"They are texting us and calling us for help," Zia Alonto Adiong, spokesman for the provincial crisis management committee, said of the 2,000 people his office had recorded being unable to leave areas held by the militants.
"They can't leave because they are afraid of running into checkpoints put up by the gunmen."
Authorities said the gunmen had already murdered at least 19 civilians, including women and children, while 17 members of the security forces had died in the clashes and 61 militants were killed.
Philippines escalates war on terror
Eight bodies were found on Sunday morning dumped off a bridge on the outskirts of Marawi, which is normally a bustling city of 200,000 people known as a centre of Islamic culture and education.
Myrna Bandung, a Catholic woman, told reporters at a checkpoint on Monday as she accompanied one of those bodies out of the city that she had been with the eight when they were murdered.
"They did not kill me because I was able to recite a Muslim prayer. The others were not so lucky," a visibly shocked Bandung said.
Most of the city's residents had fled to nearby towns.
But adding to the fears for those who remained, the military announced on the weekend that it would intensify a bombing campaign on the areas being held by the militants.
When asked on Monday about fears of civilians being bombed, military spokesman Brigadier-General Restituto Padilla told reporters that airstrikes would be done with precision.
However he said the bombings would continue in whichever areas the militants were hiding.
Meanwhile, an AFP reporter heard intense gunfire on Monday afternoon near the main university in Marawi, and saw smoke apparently from a bomb explosion rise up in the distance.
Raid backfires
The violence began when dozens of gunmen went on a rampage throughout Marawi in response to an attempt by security forces to arrest Isnilon Hapilon, a veteran Filipino militant regarded as the local leader of IS.
The United States regards Hapilon as one of the world's most dangerous terrorists and has offered a bounty of $5 million for his capture.
The gunmen on Tuesday planted black IS flags, took a priest and up to 14 other people hostage from a church, and set fire to buildings. The fate of those hostages remained unknown.
Duterte and military chiefs have said most of the militants belong to the local Maute group, which has declared allegiance to IS and which the government estimates has about 260 armed followers.
Malaysia, Indonesian, Singaporean and other foreign fighters had joined them, the military said.
Padilla said Monday that some of the more than 100 inmates who had escaped a local jail during the initial rampage last week were also suspected to have joined the fighting.
He said some of those who escaped were members of the Maute group.
Duterte had previously said local criminals were also backing the Maute in Marawi.
Cooperation between Islamist militants, criminals and corrupt politicians is common across Mindanao, where a Muslim separatist rebellion has claimed more than 120,000 lives since the 1970s.
The main Muslim rebel groups have signed accords with the government aimed at forging a final peace, giving up their separatist ambitions in return for autonomy.
The Maute and other small hardline groups are not interested in negotiating and have in recent years looked to IS to help them.
Duterte said Saturday he was prepared to enforce martial law for as long as was necessary to end the terrorist threat, and even ignore constitutionally mandated safeguards such as Supreme Court and congressional oversight.