Families who were trapped in the besieged city of Marawi for more than a week have been rescued by the Philippines military. As government forces battle to reclaim the city from Isis-linked militants, civilians have been caught in the crossfire, to afraid to leave their homes.

At an evacuation centre outside the besieged Philippine city of Marawi, the results of a week of misery were evident in the faces and hearts of those rescued. Bilal Sulaiman, a 47-year-old carpenter, told AP his wife and three children evacuated to safety early in the conflict but he stayed behind to watch their house near the scene of the battle.

He said when the fighting became too fierce, with bombs exploding two blocks away from his house, he ran for his life to a hide on a mountain, where he waited without food and water until he decided to swim across a pond to safety. He waited in an army-controlled area until was retrieved by government rescuers.

Philippine authorities said troops had cleared almost 90 percent of Marawi. Military spokesman Brigadier General Restituto said 960 civilians had been rescued and an estimated 1,000 residents remained trapped in the city.

At least 177 people have been killed in the violence, which erupted on Tuesday 23 May after soldiers launched a raid to capture militant leader Isnilon Hapilon, who has been designated leader of Isis's Southeast Asia branch. However, the operation went awry and Hapilon got away. Fighters loyal to him surprised the troops with their firepower, fending off air strikes and house-to-house searches. The dead include 120 militants, 19 civilians and 38 government forces.

Eleven government troops were killed in "friendly fire" when one of their own planes bombing rebel positions missed its target. "Sometimes in the fog of war a lot of things could happen. Accidents happen, like this," Defence Secretary Delfin Lorenzana told a news conference. "It's very sad to be hitting our own troops," he added. "There must be a mistake somewhere, either someone directing from the ground, or the pilot."

Lorenzana said militants who were Saudi, Malaysian, Indonesian, Yemeni and Chechen were among eight foreigners killed in the fighting, in what experts say is a sign the Philippines may have a major problem on its hands.

The slow pace of the military's efforts to retake Marawi – with air support and far superior firepower than the rebels – has prompted questions about its strategy. That has been compounded by social media images of smiling fighters with assault rifles posing on an armoured, US-made police combat vehicle, dressed in black and wearing headbands typical of Isis. Another picture showed a bearded man at the wheel of a police van flying an Islamic State flag. The authenticity of the images has not been independently verified and the military has urged the public not to spread "propaganda".

The military believe the Maute group staged the Marawi takeover during Ramadan to prove itself to Isis and try to win its endorsement as its affiliate in Southeast Asia. The unrest has boosted fears that Isis's violent ideology is gaining a foothold in the country's restive southern islands, where a Muslim separatist rebellion has raged for decades.

Padilla said Hapilon is believed to still be in Marawi. "We believe he is still there, and we believe that is why they are putting up a very stiff resistance in the areas that they are still being held up and being cleared," Padilla told reporters in Manila. Eight militants have surrendered and provided "very, very valuable intelligence" during questioning, Padilla said.

President Rodrigo Duterte, who declared martial law on Mindanao island, has approved the creation of a "peace corridor" to hasten the rescue of civilians and delivery of humanitarian aid for displaced people, said presidential spokesman Ernesto Abella. He said the corridor will be implemented by the government and the main separatist group, the Moro Islamic Liberation Front, which has signed a peace agreement in exchange for Muslim autonomy in Mindanao, the southern third of the Philippines.