The siege of Marawi has entered its third month, and there is no sign of it ending any time soon. About 70 militants with powerful machine guns, drones and "seemingly unlimited ammunition" are thought to remain holed up in the debris of what was once a flourishing commercial district, along with many civilian hostages. More than 500 people have been killed, including 45 civilians and 105 government troops.

Marawi siege martial law
A Philippine Marine walks along a cleared street towards the main battle area in Marawi Jes Aznar/Getty Images

After missing several self-imposed deadlines to re-take the city, the military says its options are limited because of the hostages. Philippines President Rodrigo Duterte says he is prepared to wait for a year for it to end.

The military admits it underestimated the enemy and is struggling to finish off the highly organised, pro-Isis fighters who swept through Marawi on 23 May and have held parts of it despite sustained ground attacks by hundreds of soldiers and daily pummelling by planes and artillery.

On Saturday (22 July), Duterte's request to extend martial law to the end of the year on the island of Mindanao was granted, giving greater powers to security forces to go after extremists with a reach that goes far beyond Marawi. The 60-day martial law had been due to expire on Saturday.

During the special session of Congress, a wounded army officer, 1st Lt Kent Fagyan, told how troops smashed concrete walls of houses and buildings with sledgehammers to advance slowly toward militant positions away from sniper fire. Troops dealt with booby traps and had to wrest back control of Marawi communities room by room, he said, adding that the militants had powerful machine guns, drones and "seemingly unlimited ammunition."

The military chief of staff, General Eduardo Ano, warned that extremist groups have plotted similar insurrections in other southern cities. "There was an order for them to do their own version of Marawi in other areas, but we were able to stop this because of martial law," Ano told legislators.

Left-wing activists opposed to Duterte's declaration rallied outside Congress. Some opponents argued that government forces could deal with the attack in Marawi without resorting to martial law. Others worried that the extension was too long and that the rest of the country may eventually be placed under martial rule.

The southern Philippines has been marred for decades by insurgency and banditry. But the intensity of the battle in Marawi and the presence of foreign fighters fighting alongside local militants has raised concerns that the region may be becoming a Southeast Asian hub for Isis as it loses ground in Iraq and Syria. Militants from neighbouring Malaysia and Indonesia, both Muslim-majority nations, are fighting in Marawi.

Security experts say the government needs a strategic overhaul after failing to act on warnings long ago that radical ideology was taking hold in Mindanao, and luring foreign fighters unable to join Islamic State in Syria and Iraq.

The Marawi assault was planned and executed by a relatively new group, Dawla Islamiya, better known as the Maute Group, which wants recognition from Isis as its regional affiliate. Led by two brothers, the Maute Group want a "Wilayah", or province of Islamic State, in Lanao del Sur province, where it has engaged in fierce battles with the military since 2016, each time suffering heavy losses before regrouping months later.

The brothers, Abdullah and Omarkhayam Maute, have been joined by Isnilon Hapilon, the anointed Southeast Asian "Emir" of Islamic State and leader of a faction of another Mindanao group, Abu Sayyaf.

Marawi siege martial law
A Philippine Marine walks past graffiti during a patrol in Marawi Ted Aljibe/AFP

The Marawi fighting has been much publicised across militant networks and experts say it could attract more fighters to the region. "It has inspired young extremists from around the region to want to join," the Institute for Policy Analysis of Conflict said in a report, adding the fighting had "lifted the prestige of the Philippine fighters in the eyes of Isis Central".

Richard Javad Heydarian, a political science professor at Manila's De La Salle University, said the Marawi crisis erupted not because of intelligence failures, but the policy priorities of Duterte. He said Duterte, who came to power a year ago, channelled security resources into a war on drugs instead of countering Islamic radicalisation in the south, an issue the president himself has himself flagged in the past. "They were all aware of this. It was just a matter of time," Heydarian said.

The economy is expected to dominate Duterte's second State of the Nation address today (Monday 22 July).