THE silence is startling. The only sound is the slight creaking of the metal strips peeling off bombed buildings like bandages. A fancy light fixture hangs askance in what might have been a dining room. Elsewhere dirty toys lie in piles defecated on by dogs. The animals are healthier here than elsewhere in Marawi, says one local, because they ate the bodies of those killed in the fighting last year.

The conflict between fighters linked with Islamic State (IS) and the Philippine armed forces ended in October, after five months of destruction. More than 800 jihadists died alongside 163 soldiers and at least 47 civilians. The rebuilding, especially of the heavily damaged eastern half of the city, has barely begun.

Marawi is a troubled spot on a troubled island. Mindanao is home to most of the Philippines’ 6m or so Muslims, a minority that often feels discriminated against by the country’s 97m-odd Christians. Conflicts abound—between the state and groups wanting autonomy, or religious militants, or restive clans, or communist insurgents, or bandits and pirates.

Few realised the danger when one crew of Muslim insurgents-cum-kidnappers, Abu Sayyaf, pledged allegiance to IS in 2015. A botched attempt to detain one of its leaders in May unleashed the violence in Marawi. The Maute group, another violent outfit that was once considered a mere local mafia, joined the fray, too, after aligning with IS. Romeo Omet Brawner, a colonel who helped lead operations to retake the city, says the government’s victory required its forces to advance on the insurgents from the rear. The offensive took months, because attempts to cross the three bridges over the Agus river proved deadly. He believes the “decisiveness” of Rodrigo Duterte, the president, and the resulting declaration of martial law in July, led to the army’s victory.

From tents to sheds

Miles from the city, small clusters of yellow tents line the road. Some 200,000 people, almost the entirety of Marawi’s population, were displaced by the conflict. Fewer than half of them have been able to return. Felix Castro of the Task Force Bangon Marawi, which co-ordinates government agencies working in the area, worries about sanitation and how to move families into temporary, shed-like shelters newly built for them. The displaced say they are tired of eating handouts of rice and want to go home. One woman explains that when the fighting broke out, she told her mother to pack only three changes of clothes because they thought they would not be away for long.

Financial and legal complications are stalling homecomings. On Marawi’s western side the mayor, Majul Usman Gandamra, sits in a meeting room just metres from where a mortar landed during the conflict. The municipal building smells of fresh paint. He believes it will cost 49bn pesos ($956m) to pay for reconstruction. Water and electricity are still unavailable in swathes of the city. He laments the war’s toll on the economy, especially because poverty helped drive youngsters to the jihadists’ cause in the first place, he says. (Some recruits received payments of 300,000 pesos on joining and salaries of a sort.) Disputes over property, created by a lack of formal land titles, are preventing families from returning to the city, too. “But we cannot allow our enemies to use that against the government,” Mr Gandamra insists. Local, regional and national officials meet often to discuss what to do.

Many doubt the politicians’ claims that the city can be rebuilt better than before. Amid the piles of rubble such pessimism is understandable. Colonel Brawner says just clearing unexploded bombs and hidden devices will take until August. One local academic reckons it would be cheaper to abandon efforts to revive the eastern side of the city altogether and just build new homes elsewhere instead. But the national government’s commitment to reconstruction seems steadfast. A new military camp is to be built where the ruined town hall stands. Mr Duterte himself appeared, albeit briefly, at a ground-breaking ceremony on January 30th.

Other efforts to restore the city are less tangible. “If there ever is a rebuilding it also has to involve a sense of rebuilding people’s values,” says Datumanong Sarangani, a professor at Mindanao State University. Muslim leaders are working with different branches of government to develop tactics for discouraging the spread of extremism. The curriculum at local Islamic schools is being scrutinised. More practically, almost 3,000 displaced residents have taken part in government-run training programmes, which offer instruction in everything from baking to welding, in an effort to improve livelihoods and so reduce the allure of jihadists’ cash.

Mr Duterte, for decades the mayor of Mindanao’s biggest city, Davao, made bringing peace to the island a centrepiece of his election campaign. He is currently pushing for changes to the constitution to allow greater autonomy for Muslim areas, in keeping with a peace deal a previous government signed with the Moro Islamic Liberation Front (MILF), an insurgency which has fought for independence for Mindanao since the 1980s. This matters because any resumption of hostilities with MILF, which has thousands of fighters, could lead to even greater destruction than the rag-tag rebels in Marawi managed.

The Philippines’ allies also want peace in the region. After the eruption of violence in Marawi, Indonesia, Malaysia and Singapore all offered military assistance. America and Australia provided technological support. And international anti-piracy patrols stepped up a gear. The emergence of IS in South-East Asia—first signalled in January 2016 by a bombing in Jakarta—has scared leaders already wrestling with home-grown terrorism. Jihadists seem to have converged on Marawi from Indonesia and Malaysia as well as Chechnya and Saudi Arabia, testifying to the strength and reach of IS’s propaganda. Securing, supporting and restoring Marawi could provide a more lasting victory over such extremism in the Philippines. But it may prove even harder to achieve than the military advance.