MANILA, Philippines (AP) — A Philippine army commander says government forces have foiled an attempt by a few dozen Muslim militants aligned with the Islamic State group to attack a small southern town in fighting that left four gunmen dead.

Army Lt. Col. Harold Cabunoc says troops clashed with 30 to 40 militants Tuesday and drove them away from the small farming community of Mopac where they planned to launch an attack on the town hall of Datu Paglas town about a half kilometer (quarter mile) away.

Cabunoc said Wednesday the militants from the Bangsamoro Islamic Freedom Fighters led by Solaiman Tudon occupied several abandoned houses in Mopac, where he used to live, over the weekend but his family and other villagers asked the gunmen to leave.

Troops later clashed with the militants.