The three-storied house is the largest of the intermittent buildings flanking a grassy side street in the desolate outskirts of Marawi. Its exterior walls are so riddled with bullets it's surprising they have not crumbled and collapsed. In the gloomy interior, ammunition pouches, discarded clothing and copies of the Quran lie scattered.
It was here that Isnilon Hapilon, the leader of the ISIL-affiliate Abu Sayyaf, was cornered by the army on May 23. By bagging the notorious terrorist, the raid should have resulted in a significant victory for the government in its struggle against a growing Islamist insurgency. But a shoot-out ensued, and the soldiers quickly realised they had stirred a hornets' nest.
Heavily armed jihadists appeared out of nowhere, and the unit was soon surrounded, and eventually forced to withdraw. Hapilon was not caught, and Abu Sayyaf continues to menace
The botched raid ignited a tinderbox. The Maute Group, another local terror group that had pledged allegiance to ISIL, had secretly massed hundreds of fighters in the city. It seized the opportunity to take control of the "Islamic City of Marawi", the only Muslim majority city in the Philippines, taking hostages, killing policemen and burning down a church.
Read more: Battle for Marawi proves struggle for Philippines' seasoned troops
"They were in the city already. Some of them were locals, some of them were not," says Mohammed Khalid Al Mama, a youngster who lives near the Abu Sayyaf hideout and witnessed the raid.
As the population fled the city, the military moved in, kicking off an ongoing siege of the city on the southern island of Mindanao. After months of heavy fighting and intense aerial bombardment, a few dozen remaining Maute fighters have been hemmed into a small area in the city centre, but continue to hold out as the military leadership is reluctant to lose more soldiers and endanger the lives of the hostages.
The military will eventually succeed in wiping out the last pocket of fighters. But the duration of the siege, the widespread destruction of the city and insufficient relief efforts for the displaced population all play into the hands of the jihadists.
"The Marawi siege has been a categorical win for Maute and for the Islamic State," says Justin Richmond, a former US special forces operative deployed in the southern Philippines who founded impl.project, a development consultancy working in Mindanao. "The insurgency is stronger now. They have lost people but they are going to gain that back. This is going to be a prolonged fight."
Several hundred of the roughly 1,000 fighters that took over Marawi are thought to have slipped through the military's cordon. At the same time, the Maute Group is recruiting again on its home turf in Butig, a remote municipality south-west of Marawi. New recruits receive a signing on bonus of US$600 (Dh2,204), says Mr Richmond, a small fortune in the poverty-stricken area.
Together with other militant groups, the Maute Group had been gathering strength since the US pulled its special forces and advisers from the Philippines in 2015.
Led by the brothers Abdullah and Omar Maute, it had been successful in tapping into the grievances of the Muslim minority, which is concentrated on the western part of Mindanao and a series of smaller islands on the edge of the Sulu Sea, which separates the Philippines, Malaysia and Indonesia.
Read more: ISIL and Al Qaeda still pose threats worldwide, UN experts say
The Autonomous Region in Muslim Mindanao (ARMM), of which Marawi is part, is poor even by Philippine standards, and Muslims are widely looked down on by their Christian countrymen. To make things worse, corruption in the region is endemic at all levels of local government, entrenching poverty and stymieing economic development. Social mobility is hampered by the dominant clans in the jungle hinterlands that make up much of the region.
"The main problem of the Muslims in the Philippines and especially in the ARMM is the corruption. In all aspects, there is corruption," says Alikman Nata, a local volunteer aid worker and head of the Lanao Muslim Youth organisation.
Corruption is the main reason why despairing Muslims join jihadist groups, says Farouk Ali, a senior member of the Moro Islamic Liberation Front, a powerful armed movement.
"Corruption is always there. Not only in the ARMM [administration], also in the municipals, down to the wards," says Mr Ali, who is in Marawi to help co-ordinate the MILF's response to the crisis with the military.
After years of insurgency on Mindanao, the MILF has engaged in negotiations with the government, and in 2014 signed a peace deal that, if implemented, would replace the Autonomous Region in Muslim Mindanao with even more wide-ranging autonomy under the Bangsamoro Basic Law.
Commonly referred to as the BBL, the law still has to be ratified by parliament. The government's hesitancy to implement the BBL has angered Mindanao's Muslims, and many locals believe the decision of the Maute brothers to turn to violence was over the delay.
"It was the failure of the BBL that started their radicalisation," says Agakhan Sharief, an influential local religious figure in Marawi who runs an Islamic schooling programme.
"The failure of the BBL is a huge blow to the legitimacy of the government. It reinforces the ISIS narrative," says Mr Richmond. "The BBL isn't just a peace process, it's a fundamental recognition of the Bangsamoro identity, and a validation of the Muslim identity."
Bangasamoro is the local vernacular for Maranao Nation. Maranao is an ancient term used for the inhabitants of the autonomous region, and derives its name from Lake Lanao, on which shores Marawi lies.
Around 250,000 Maranaos from Marawi and nearby areas have been displaced to the surrounding countryside and towns by the fighting. The government response to the humanitarian crisis has been poor. Families are piled into abandoned buildings or other makeshift shelters, or languish in rudimentary tent camps on small clearings in the jungle. Supplies of food and other aid are inadequate.
The prolonged battle has not only kept them from their homes. It has also destroyed much of the city, meaning that the displaced have nowhere to return to. This is feeding a resentment that the Mautes have been encouraging by releasing propaganda videos of the destruction in Marawi.
"If the condition continues until two months from now, it will [create] more sympathisers. Because they will take it as discrimination, they will take it as oppression, and they will take it as they are not being cared for and they are not being valued," says Aslani Montila, a local aid worker that helps run an overcrowded informal shelter in a disused seminary in the nearby town of Iligan.
Philippine forces struggle to defeat Muslim extremists in Marawi
Mr Sharief, who maintains close ties to the displaced community, says that some Marawi men have already joined the Maute Group since the siege began.
The Mautes are not the only violent Islamist group posing problems for the government. The Bangsamoro Islamic Freedom Fighters (BIFF), a splinter group of the Moro Islamic Liberation Front, enjoys substantial support from the local population and is more formidable force than the Mautes, says Mr Richmond.
The delay in bringing further autonomy to Muslim Mindanao is strengthening the insurgents at the expense of the MILF.
"The problem the [Front] has is that the BBL isn't moving, so they don't really have anything to offer to their constituents," says Mr Richmond.
Many of the younger fighters in the organisation had become disillusioned, and joined the Maute Group or the Freedom Fighters. Even Omar and Abdullah Maute began their militant careers with the MILF before forming their own group.
Mr Sharief, who knows Abdullah and Omar personally, and who has in the past acted as an intermediary between the MILF and the government, was sent into the Marawi several times to negotiate the release of hostages at the beginning of the siege. Each time he went, he recognised Maute fighters he knew from their time in the MILF, he says.
President Rodrigo Duterte has pledged to make the BBL a priority. If he cannot get parliament to pass the law, the MILF will probaly resume its fight against the government. Some of the more firebrand commanders are already keen to resume the armed struggle, says Mr Sharief.
"I have talked to [Front] commanders. They said, 'If we cannot support ISIS, we will start a new war, because we believe the government is not sincere with this agreement,'" he says.
A further destabilisation of the southern Philippines is not a problem for Manila alone. The vast, impenetrable jungle of Mindanao and an increasingly supportive Muslim population are an ideal breeding ground for a violent extremism that can spread throughout the entire region.
If the government fails to quell the insurgency in Mindanao, it will provide aspiring jihadists from abroad with skills and experience they can bring to bear in their home countries. There will be no shortage of foreign recruits.
"What we are going to see is that Mindanao is where everyone comes to fight. So if you want to get your combat experience in, and you're from Malaysia, Indonesia, Bangladesh or Singapore, come to Mindanao to fight, and then take that experience back to your own country and then radicalise it," says Mr Richmond.
Militant groups in the Philippines:
Fighters in the Philippines often move between Islamic militant groups, some of which have disbanded over the years while others have spurted from bigger organisations.
The Moro National Liberation Front (MNLF), which was established in the early 1970s and led by Nur Misuari, fought for independence from the central government in the Moro region.
A ceasefire was brokered in 1976, after which the Moro Islamic Liberation Front (MILF) broke off from the MNLF rejecting Manila's offer of semi-autonomy of the regions in dispute and continued insurgency operations.
Meanwhile, Abu Sayyaf Group was established in 1991 from radical members of the old MNLF who wanted to continue fighting for an independent Islamic state. Abu Sayyaf continues to wreak havoc in Marawi, the only Muslim majority city in the Philippines, engaging in kidnappings and extortion. Its leader, Isnilon Totoni Hapilon, swore an oath to ISIL in 2014.
In 1996, the MNLF signed a landmark peace agreement with the government that saw the creation of the Autonomous Region in Muslim Mindanao (ARMM).
MILF and the Philippine government signed a peace agreement in Kuala Lumpur in 2014 for the creation of a new Muslim autonomous region called Bangsamoro.
The Bangsamoro Islamic Freedom Fighters (BIFF) was established in 2008 after its founder – who was a member of MILF – disagreed with the Front's acceptance of autonomy rather than full independence.
Ansar Al Khalifah Philippines (AKP) also broke away from MILF and, in 2014, pledged allegiance to ISIL.
Meanwhile, the Maute Groupe, led by brothers Omar and Abdullah Maute, was established in 2013 and made up of former MILF fighters.
The Abu Sayyaf Group, Ansar Al Khalifah Philippines, Bangsamoro Islamic Freedom Fighters, the Maute Group, along with local clans and foreign fighters are the current force in Marawi.