Updated

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

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.

Philippines-forces

Government troops head for a continuing military operation against Muslim militants who lay siege in Marawi city Friday, May 26, 2017 at Bal-oi township, Lanao del Norte province in southern Philippines. Philippine army generals say dozens of Islamic State group-linked extremists have been killed in two days of fighting in a southern city that has been under siege since one of Asia's most-wanted militants evaded capture and dozens of rebels came to his aid. (AP Photo/Bullit Marquez) (Copyright 2017 The Associated Press. All rights reserved.)

"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.