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."

Marawi Maute
A soldier walks past pro-Isis graffiti in MarawiRomeo Ranoco/Reuters
Marawi Maute
Pro-Isis graffiti is seen on a wall in MarawiRomeo Ranoco/Reuters
Marawi Maute
A man rides his motorcycle past shuttered shopfronts sprayed with pro-Isis graffiti in MarawiNoel Celis/AFP
Philippines Marawi Isis Islamic State
Islamic State flags are seen along a street in the Maute militant group's strongholdErik De Castro/Reuters

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".

Marawi Maute
A wounded soldier is carried on a stretcher by his comradesRichel Umel/Reuters
Marawi Maute
Government soldiers carry the coffin of a soldier who was killed during the fight against Maute insurgents in MarawiRomeo Ranoco/Reuters

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.

Isis in the Philippines: What is happening in Marawi? Newsweek

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.

Marawi Maute
A Philippine Air Force attack helicopter fires a rocket during the fight against the Maute group in MarawiErik De Castro/Reuters
Marawi Maute
A cloud of smoke and dust rises after an air strike on MarawiNoel Celis/AFP
Marawi Maute
An OV-10 aircraft is pictured during an air strike over MarawiRomeo Ranoco/Reuters
Marawi Maute
Damaged buildings and houses are seen in the Moncado Colony area of MarawiRomeo Ranoco/Reuters

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.

Marawi Maute
Police and military forces kick a door while conducting a house-to-house search in MarawiReuters
IBTPOTY2017 Pictures of the week
7 June 2017: Security forces inspect an empty house near a military camp in Marawi, PhilippinesJes Aznar/Getty Images
Marawi residents rescued
A government soldier takes position during an ongoing assault on insurgents from the Maute groupRomeo Ranoco/Reuters
Marawi Maute
Government troops are seen onboard a truckRomeo Ranoco/Reuters

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.

Marawi residents rescued
A government soldier gestures as he carries a boy rescued from his homeRomeo Ranoco/Reuters
Marawi residents rescued
Residents rescued by government soldiers look for their loved ones as the government troops continue to assault the Maute group in MarawiRomeo Ranoco/Reuters
IBTPOTY2017 Pictures of the week
An evacuated student shows her drawing about what she and other Marawi residents experienced before fleeing the cityNeil Jerome Morales/Reuters
Marawi Maute
A woman cries next to her son, covered by a blanket, after he was hit by a stray bullet while praying inside a mosque in MarawiRomeo Ranoco/Reuters
IBTPOTY2017 Pictures of the week
Soldiers and residents bury the body of a boy who was hit by a stray bullet while praying inside a mosque in MarawiRomeo Ranoco/Reuters

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.

Marawi Maute
Philippines President Rodrigo Duterte awards a medal and cash to a wounded soldier during his visit to the military camp hospital in Cagayan De OroRomeo Ranoco/Reuters
Philippines Marawi Isis Islamic State
Philippine President Rodrigo Duterte looks at the coffin of a soldier killed in Marawi, before his funeral in Iligan CityMalacanang Presidential Palace/Reuters

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.