Fighting in Marawi in the southern Philippines has entered its fourth week, and military officials have conceded that they are struggling to loosen the grip of Islamist fighters, despite relentless bombing.

A week ago, the military said they had recaptured 90 percent of Marawi and expected the fight to be over within days. Now they say the Isis-linked Maute insurgents control 20 percent of the city.

However, Islamic State's news agency Amaq claims the militants control two-thirds of the the city. It says the military in the largely Christian Philippines has "completely failed" to take back Muslim-majority Marawi. In a report, it said: "Islamic State fighters are spread in more than two-thirds of Marawi and tighten the chokehold on the Philippine army that is incapable of maintaining control of the situation."

The death tolls claimed by the military and the extremists also vary widely. The official number of security forces and civilians who have died in the battle for Marawi is 58 and 26, respectively, with 202 militants killed. Amaq claims at least 200 government troops have been killed and many had abandoned their posts, leaving behind weapons that were seized by the militants. Military spokesman Brigadier General Restituto Padilla branded the Amaq report "pure propaganda".

Amaq released a video showing insurgents fighting and what it said was the execution of six Christians who were shot simultaneously in the back of the head.

The insurgents – with skilled snipers, rocket-propelled grenades and high-velocity assault weapons, according to Philippine army officials – have repelled the sustained push by the military to retake the town.

Asked when the fighting would end, Padilla said: "I can't give you an estimate because of compounding developments faced by ground commanders." The military had set Monday 13 June as a target date to flush out the militants. Flags were raised in the town to mark Philippines independence day, but heavy gunfire resumed early the next day, and the military continued to target the militants with mortars and helicopter-mounted machine guns.

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. Almost the entire population of about 200,000 fled after the militants tried to overrun it, but the military believes that there are still some 300-600 civilians trapped or being held hostage.

Several residents have braved sniper fire to dash across a bridge to safety. Some were shot dead, a few made it alive. At least 100 people have made their way out on foot, braving volleys of sniper fire, said Zia Alonto Adiong, a local politician managing rescue and relief efforts. Others have swum across a river or a lake to safety, according to relief workers.

Doctors treating those who escaped say they have been struck by the resilience of people who spent weeks surviving in a conflict zone and witnessing horrific violence. "Some of the stories that stuck were Muslims helping protect Christian workers by letting them borrow a hijab," said Dr Gioia Ancheta, head of the psychosocial therapy team.

President Rodrigo Duterte, who declared martial law in Mindanao on 23 May, 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 Islamist militants 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.

The US military has deployed a spy plane at Manila's request to help provide surveillance. Duterte took an adversarial stance toward former US President Barack Obama, who had criticised his bloody anti-drug crackdown, but his relations with Donald Trump have been markedly better.

The Marawi siege unfolded after a May 23 army raid failed to capture a top terror suspect, Isnilon Hapilon, who has been designated by Isis as its leader in Southeast Asia. The raid pre-empted a plot by about 500 gunmen waving Islamic State group-style black flags to capture all of Marawi and kill as many Christians as they could, military officials say.

The conflict in Marawi has raised fears that Islamic State's violent ideology is gaining a foothold in the Philippines' restive south, where Muslim separatists have fought for greater autonomy for decades.