The Armed Forces of the Philippines on Saturday declared an eight-hour halt to its air and ground offensive against militants aligned with the Islamic State group in Marawi city to allow residents, most of them displaced by the fighting, to celebrate the end of the Muslim fasting month of Ramadan.

(REUTERS/Romeo Ranoco / MANILA BULLETIN)

Military spokesman Brig. Gen. Restituto Padilla said the “humanitarian pause” in military assaults will take effect at 6 a.m.Sunday in predominantly Muslim Marawi but will be lifted immediately if the militants open fire or threaten troops and civilians.

“If the enemy starts firing … anyone can exercise their right to self-defense,” Padilla said in a statement.

It’s the first planned respite in the massive offensive after a month of daily street to street battles and military airstrikes that have left at least 280 militants, 69 soldiers and policemen, and 26 civilians dead. The intense fighting has turned large swaths of the mosque-dotted city, a bastion of Islamic faith in the south of the largely Roman Catholic nation, into a smoldering war zone.

About 500 gunmen, including several foreign fighters, stormed the lakeside city of 200,000 people, occupied buildings, burned schools and hoisted Islamic State group-style black flags on May 23.

Faced by his worst crisis, President Rodrigo Duterte responded by declaring martial law in the south and ordering a massive offensive.

Padilla said the cease-fire will be observed by the military “as a gesture of our strong commitment and respect to the Muslim world,” particularly to Marawi’s Muslim residents.

The fighting has forced more than 300,000 people to abandon their homes in Marawi and outlying towns and flee to evacuation centers, which rapidly became overcrowded, making it difficult for them to celebrate the Eid el-Fitr holiday.