Hundreds of civilians still trapped in Marawi as heavy battles between Philippine forces and ISIL-linked fighters go on.

Fighting in Marawi City in the southern Philippines has entered its fourth week, with military officials conceding that troops were struggling to loosen the grip of ISIL-linked fighters on downtown precincts despite relentless bombing.

Military spokesman Brigadier General Restituto Padilla said the urban terrain was hampering the army’s progress because the rebels had hunkered down in built-up neighbourhoods, many of them with civilians they had taken as human shields.

READ MORE: ‘Foreigners fighting’ with ISIL-linked Philippine group

Asked when the fighting would end, Padilla said: “I can’t give you an estimate because of compounding developments faced by ground commanders.”

Hundreds of other civilians were still trapped in the ruins of the town and – facing capture, starvation or bombardment from above – several have braved sniper fire to dash across a bridge to safety. Some were shot dead, a few made it alive as the fighting continued on Tuesday.

Almost the entire population of about 200,000 fled after the fighters tried to overrun it, but the military believes that beyond the checkpoints now fencing off its main roads there are still some 300-600 civilians trapped or being held hostage.

The military had set Monday, the Philippines’ Independence Day, as a target date to flush out the fighters, both local and foreign.

WATCH: Inside story – What’s behind the latest crisis in the Philippines?

President Rodrigo Duterte, who declared martial law in the island of Mindanao on May 23 hours after several hundred fighters overran parts of Marawi City and tried to seal it off, did not show up at any independence day events.

Duterte is best known for a brutal war on drugs since he took office a year ago, and he has suggested that funding for the fighters, who have pledged allegiance to ISIL, came from the narcotics trade.

Some media reports highlighted the absence of the president at a time of serious conflict, but a spokesman said he was tired and needed to rest.

As of Tuesday, the number of security forces and civilians who had died in the battle for Marawi officially stood at 58 and 26, respectively. The death toll of fighters was put at 202.