Residents of a southern Philippine city where Islamic State supporters waged a brutal five-month battle began returning home on Tuesday, but gunfire greeted them as soldiers scoured devastated neighbourhoods for remaining militants.
Defence chiefs announced on Monday that the fighting, which claimed more than 1,100 lives and left the eastern half of Marawi in ruins, had ended following a final clash in a mosque in which dozens of gunmen were killed.
The militants had occupied Marawi, the Islamic capital of the mainly Catholic Philippines, on May 23 in what President Rodrigo Duterte and security analysts said was a bid to establish a Southeast Asian base for IS.
The campaign to oust them turned into the Philippines' longest urban war, forcing about 400,000 people to flee their homes as the militants defied near daily bombing raids by hiding in basements, tunnels and mosques.
"We are afraid but we want to check on our houses," Jamaliah Lomontong, a village official aged in her 40s, told AFP as she and some relatives walked into their neighbourhood near where the main fighting occurred.
Lomontong said her house had survived, although it bad been looted.
"Anything easy to take away has gone -- televisions, laptops," she said.
Only a few dozen civilians could be seen on Tuesday morning on the outskirts of the the mostly destroyed eastern half of Marawi, where regular bursts of gunfire and occasional explosions could still be heard.
However the sounds of war did not mean there was renewed fighting, according to Colonel Romeo Brawner, deputy commander of Marawi forces.
He told AFP they were due to soldiers going through buildings looking for militants who may still be hiding, while troops were also detonating bombs that the gunmen had planted.
"It's possible that there were some (militants) left behind. In every war, that is the SOP (standard operating procedure)," Brawner told AFP.
"So the firing is part of the mopping operations, because if there are holes, tunnels (in buildings), then the troops fire first into the hole before they check with their flashlights," he said.
In the western half of the city, which largely escaped the fighting, hundreds of residents had begun returning.
"I feel a mixture of joy and sadness," businessman Gonaranko Mapandi Jnr, 46, told AFP as he stood close to a military checkpoint.
"I'm happy because we are able to return. But I'm very sad at what happened to my city."