MARAWI CITY, Philippines (Reuters) - Marawi resident Baimona Amintao hopes her turn comes quickly once authorities begin raffling off the first batch of temporary shelters for those who lost their homes to the five-month battle to retake the southern Philippine city from Islamist militants.

Amintao and her five children were among the thousands of families displaced since fighting erupted in Marawi on May 23, when security forces tried to arrest Isnilon Hapilon, Islamic State’s “emir” in Southeast Asia.

The Philippines on Monday announced the end of military operations in Marawi after a fierce and unfamiliar urban war in the country’s biggest security crisis in years, paving the way for rebuilding and rehabilitation efforts to begin.

More than 1,000 transitional houses, with basic bathroom and cooking facilities, could be completed within two months on the outskirts of Marawi, the Philippine housing agency has said.

Residents whose homes were devastated will get first priority in allotment raffles that could be held either before or after construction.

“I hope I can be included in the raffle and be able to stay there for my children’s well-being,” Amintao, 26, who formerly owned a small grocery store, told Reuters.

“Many people here prioritize their children since many of the kids cannot stand living inside the tents and are getting sick.”

The government estimates the rebuilding of Marawi could cost at least 50 billion pesos ($971 million).

Authorities said 920 militants, 165 troops and police and at least 45 civilians were killed in the conflict, which displaced more than 300,000 people.

Philippine President Rodrigo Duterte has placed the southern island of Mindanao, where Marawi is located, under martial rule to help security forces in crushing the rebel movement.

The rebel occupation stunned a military inexperienced in urban combat and stoked wider concerns that Islamic State loyalists have gained influence among local Muslims and have ambitions to use the island as a base for Southeast Asia operations.

Those fears are compounded by the organization of the militant alliance and its ability to recruit young fighters, lure foreign radicals, stockpile huge amounts of arms and endure 154 days of ground offensive and air strikes.

The social welfare department said more than 5,000 families still live in covered gymnasiums and tent cities.

“I could not fathom what happened to our village and I hope this does not happen again,” said Alniah Magoyag, a village official. “No more terrorists in Marawi City.”