Hundreds of gunmen initially attacked a lightly guarded military outpost at dawn, with about 30 then taking over the school and using civilians as human shields, the military said.
"As of now they are in the school holding the civilians. They are using them as human shields," Captain Arvin Encinas, spokesman for the army division with responsibility for the area, told AFP by phone.
Encinas said the gunmen had planted improvised bombs around the school, a small building in a rural area, and that soldiers had surrounded it.
The unrest occurred in Pigkawayan, a farming town about 160 kilometres (100 miles) from Marawi city where fighters linked to the Islamic State (IS) group have been battling troops for a month in a conflict that has claimed hundreds of lives.
Armed forces spokesman Restituto Padilla said the attackers at Pikgawayan belonged to the Bangsamoro Islamic Freedom Fighters (BIFF), one of four groups in the southern Philippine region of Mindanao that have pledged allegiance to IS.
Padilla said the gunmen attacked the outpost at daybreak, then exchanged fire with troops in the morning before retreating in a hit-and-run assault typical of BIFF fighters who are based in Muslim communities in the area.
"It's already resolved. The enemy has withdrawn... They failed," Padilla said late on Wednesday morning.
However about six hours later Encinas reported the hostage crisis at the school.
Padilla then confirmed militants had taken over the school, and said the military would seek to broker a solution.
Encinas and Padilla said there had also been skirmishes throughout the day outside of Pigkawayan, which is surrounded by marshlands, mountains and farmlands.
Those areas are largely lawless areas with mixed Muslim- Christian communities where the BIFF, other Muslim rebels and political warlords hold sway.
Pigkawayan mayor Eliseo Garsesa said about 200 gunmen were involved in the initial assault.
Muslim rebels have been fighting for more than four decades for an independent or autonomous region in the south of the mainly Catholic nation, with the conflict claiming more than 120,000 lives.
Philippine President Rodrigo Duterte declared martial law across Mindanao, home to 20 million people, on May 23 immediately after fighters flying the IS flag rampaged through Marawi.
Disclaimer: No Business Standard Journalist was involved in creation of this content
