Soldiers found corpses in the streets of a besieged Philippine city on Sunday as troops battled a weakened but still forceful group of militants linked to the Isis terrorist group.

At least eight executed civilians, most shot in the head and some with their hands tied behind their heads, were among the bodies discovered as the death toll from six days of fighting neared 100.

The dead men were labourers stopped by militants trying to flee clashes, according to police. Attached to one of the bodies was a sign that said “Munafik”, meaning traitor to faith.

The crisis in Marawi, home to some 200,000 people, has grown increasingly desperate as the Maute rebel group show unexpected strength, fending off a military that has unleashed attack helicopters, armoured vehicles and scores of soldiers.

At least 19 civilians have been killed in a week of fighting.

The violence prompted President Rodrigo Duterte on Tuesday to declare 60 days of martial law in the southern Philippines, where a Muslim separatist rebellion has raged for decades.

But the recent bloodshed in Marawi has raised fears that extremism is growing as smaller militant groups unify and align themselves with Isis.

Much of the city is a no-go zone but as the military advances and more civilians escape, the scope of the battle is becoming clear.

Troops have been battling Isis-linked rebels for a week (AP)

Thousands of civilians have streamed out of Marawi but more than 2,000 were still trapped inside the city. Many sent desperate text messages begging to be rescued and reporting that their homes had been destroyed, said Zia Alonto Adiong, an official in Lanao del Sur, one of the country's poorest provinces.

“Have mercy on us, we don't have any more water to drink,” read one of the messages, sent to a hotline set up for trapped residents.

The Associated Press was shown the messages by relief workers at a provincial government complex in Marawi. Another message asked authorities to retrieve three bodies that were rotting near a resident's home.

Speaking at the evacuation centre on Sunday, Saddat Liong said his house was hit by mortar fire and burned to the ground. Liong, his wife and eight children lost everything, he said – even their cooking pots.

“I feel that we’ve lost our city,” he said.

Military spokesman Restituto Padilla said militants were weakening as combat went on.

“We believe they're now low on ammunition and food,” he said, speaking by phone from the capital Manila.

“Compared to the initial days, there has been increasingly less resistance from the militants within Marawi.”

Thousands of people have fled Marawi as violence rages (Reuters) (REUTERS)

Padilla said the bodies of four men, three women and a child were found near a road close to Mindanao State University in Marawi.

Eight other men were found gunned down and thrown into a shallow ravine early Sunday in Marawi's Emi village, said police officer Jamail Mangadang.

A paper sign attached to one of the men indicated that the victims had "betrayed their faith," he said, identifying the men as civilians. Marawi is a mostly Muslim city.

In addition to the civilian deaths, Padilla said 61 militants, 11 soldiers and four police were among the dead.

The violence erupted Tuesday night when the government launched a raid to capture Isnilon Hapilon, who is on Washington's list of most-wanted terrorists. But the operation went awry and militants rampaged through the city, torching buildings and battling government forces in the streets.

A priest and several worshippers were taken hostage. There was no word on their wellbeing.

Hapilon, an Islamic preacher, is a commander of the Abu Sayyaf militant group who pledged allegiance to Isis in 2014. He also heads an alliance of at least 10 smaller militant groups, including the Maute, which has a heavy presence in Marawi and has been instrumental in fighting off government forces in the current battles.

All of the groups are inspired by Isis. Defence secretary Delfin Lorenzana told reporters that Hapilon has received funds from Isis.