When Isis-backed militants took over parts of the picturesque lakeside city of Marawi in May, the Philippines's defence minister Delfin Lorenzana predicted the entire conflict would be over in one week. However, the battle has been so intense and the gains so slow that it took the military a whole week just to cross one street in the embattled city.

Brigadier General Melquiades Ordiales of the Philippines 1st Marine Brigade told Reuters: "It was really very, very tough. It took us one week from this point to that point, to cross that street." He pointed out the other side of a two-lane road in the heart of the southern Philippines city, lined by three-storey buildings shattered by air strikes and the remaining walls riddled with bullet holes.

Marawi Philippines Isis Maute
Government soldiers on patrol walk near damaged buildings and houses as troops continue their assault on the Maute group Romeo Ranoco/Reuters

The grinding urban warfare that has destroyed much of the grandly named Sultan Omar Dianalan Boulevard shows just how fierce the fighting has been. The militants are better armed than expected, with high-powered weapons, night vision goggles, the latest sniper scopes and surveillance drones, Captain Arnel Carandang, of the Philippines Army First Scout Ranger Battalion, told Reuters.

Marawi Philippines Isis Maute
Captain Arnel Carandang of the Philippine army 1st scout ranger battalion stands amid damaged houses and buildings on Sultan Omar Dianalan boulevard Romeo Ranoco/Reuters

Carandang said he has served for almost a decade in the remote jungles and mountains of Mindanao, the southern Philippines region that has long been wracked by insurgencies. Now, he says, the military is in unfamiliar urban terrain. The militants have exploited the battlefield to their advantage and held off Philippines forces despite a 10-to-1 numerical advantage for the government troops.

Troops are engaged in running battles with the militant alliance, led by Abdullah and Omarkhayam Maute of the Maute group, and Isnilon Hapilon, a factional head of the Abu Sayyaf group, and Islamic State's so-called "emir" in Southeast Asia.

Borrowing heavily from Isis tactics in the Iraqi city of Mosul, they have surrounded themselves with hostages and used snipers and a network of tunnels. Marawi's underground drainage system and "rat holes" - crevices in the walls of high floors allowing access to adjacent buildings - have enabled the rebels to evade bombs and remain undetected, soldiers at the battlefront said.

"We believe there have been some foreign terrorists that have been directing their operations that's why they are, how do I define this, really good," said Carandang. "We have seen some cadavers of foreigners. Some are white, some are black and some tall people we guess are Asians (from outside the Philippines). We have been hearing in their transmissions some English-speaking terrorists."

Many of the fighters are young recruits, who are fanatical and accomplished fighters, the soldiers said. "By the way they move and their tactics, you can see they've been trained," said Colonel Jose Maria Cuerpo, deputy commander of the 103rd Brigade fighting in Marawi.

Hostages – many of them Christians – have been deployed to build improvised explosive devices, scavenge for food and weapons in the heat of battle and fight for the Islamist rebels, according to those who escaped.

"When we were first moved to the mosque, there were more than 200 of us," an escaped hostage, who asked not to be identified for safety reasons, told Reuters. "We gradually became fewer. People would go on errands but they wouldn't come back. They either escaped or died. By the time I left, there were only about 100 of us." The account could not be verified, but military officials confirmed the man escaped from Marawi in early August.

The hostage said the militants were excited by their successes in Marawi, speaking often of the advantages of urban warfare and talking about some of their next possible targets, including other cities in Mindanao and the Philippines capital Manila. "They said they could hide well in the cities. They can get civilians to become hostages and it's more difficult in the mountains with only the soldiers," he said.

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

Much of this bloodshed could have been avoided, local political leaders told Reuters. Naguib Sinarimbo, a Muslim leader who has negotiated between the military and Islamic separatists for years, said he and other elders had urged the armed forces to allow militias and rival Islamist groups to take the lead in ousting the Islamic State militants.

The groups were familiar with Marawi's terrain and, through family and clan links, could influence many of the fighters to lay down their weapons, they told the armed forces. The proposal was rebuffed, Sinarimbo said. Air power, the military assured them, was the path to a quick win.

Zia Alonto Adiong, a provincial politician, said the military also had doubts about the loyalty of some of the "political personalities" offering to provide their militias to push out the fighters.

The result was a city in ruins, hundreds of thousands of residents displaced and "emboldened" Islamists, Sinarimbo said. "They proceeded with the aerial bombing but they didn't take the city," Sinarimbo said. "The military lost authority."

In addition, the devastation of the city will play into militants' hands, creating resentment and further radicalising many youngsters, he said.

Now, after four months of intense aerial bombardment and house-by-house battles, Philippine commanders believe they are in the final stages of the operation to oust the rebels from the city. In the past two weeks, military officials say they have conquered three militant bastions, including a mosque, and restricted about 60 remaining guerrillas to about 10 devastated city blocks in the business district. Patrols have been increased on the lake to prevent the supply of armaments and recruits to the holed-up militants.

Armed forces chief Eduardo Ano told Reuters that all routes in and out of Marawi had been sealed off and the few remaining rebels were preparing for their "last stand" and would have to decide whether to surrender, or be martyred. "That's our main goal: No way out, no way in," Ano said. "If they want to go to heaven as they declared, we will give them the chance."

The military has repeatedly missed targets and deadlines to crush the rebels, whose strength and resolve it accepts it has underestimated. The conflict in the southern region of Mindano has displaced hundreds of thousands of people and killed nearly 800 by government count – 133 soldiers and police, 45 civilians and an estimated 617 militants.

Residents say they fear the bodies of many more civilians could be in the rubble of the lakeside city. Estimates of civilians trapped in the fighting at one point were over 2,000, although authorities say 1,728 have been rescued. The Red Cross says it is investigating the whereabouts of 179 missing people.

Some in the armed forces are hopeful that at least some militants will surrender and hand over between 45 to 50 civilian captives. However, Carandang said indications were the rebels are preparing for a bloody final stand. "We are monitoring the enemy's transmissions and it's like during these final days they are being more fanatical," he said. "Transmissions indicate they are preparing for suicide bombings."

An unused suicide vest was discovered this month in Marawi's Grand Mosque, a former stronghold of the militants, government sources told Reuters. Suicide attacks are rare in the Philippines despite decades of Islamist insurgency. "That's the difference between here and Syria and Iraq," said Ordiales, the marine general. "It's almost the same war tactics and fighting tactics, the one thing that's not the same is the human bomb or the suicide bombing. "It hasn't happened, not yet."

Based on Reuters reports by Tom Allard, Martin Petty and Karen Lema.