CAGAYAN DE ORO, Philippines — Muslim extremists supporting the Islamic State group freed eight fellow militants in a daring attack that also allowed 15 other inmates to escape from a provincial jail in the southern Philippines, police said Sunday.

About 20 heavily armed fighters of the Maute militant group stormed the Lanao del Sur provincial jail in Marawi city before nightfall Saturday, disarmed the guards and rescued their eight comrades. The attackers also seized two rifles from guards, police said.

The eight who escaped were arrested a week ago when they were caught with a homemade bomb in van at a security checkpoint.

The others who escaped, apparently to divert the attention of authorities, were facing murder and illegal drugs charges.

The Maute group is a new band of armed Muslim radicals who have pledged allegiance to the Islamic State group and use black flags with logos of the Middle East-based extremists.

Based in Lanao del Sur’s Butig town, the militants have attacked army troops and beheaded a soldier and two kidnapped workers earlier this year. Before being killed, the two workers were made to wear orange shirts similar to beheading victims of the Islamic State group.

A number of Muslim armed groups in the southern Philippines, including some commanders of the violent Abu Sayyaf, have pledged loyalty to the Islamic State group. The military has tried to play down their actions, saying there has been no evidence of an active collaboration between the foreign extremists and Filipino militants who are aiming to prop up their image and secure badly needed funds amid years of battle setbacks.

President Rodrigo Duterte, who took office in June, has pursued peace talks with two large Muslim rebel groups, but has ordered troops to destroy the Abu Sayyaf and other hard-line militants.

Troops have continued on-and-off offensives against the Maute militants in Butig in Lanao del Sur, a predominantly Muslim province, about 830 kilometers (520 miles) south of Manila.

A major offensive against the Abu Sayyaf in Sulu province’s mountainous Patikul town, also in the south, has killed at least 19 militants, including an influential commander, Mohammad Said, who used the nom de guerre Amah Maas, his two sons, and another ranking fighter, Latip Sapie, military officials said.

Said, who had severed arms and was among the most senior Abu Sayyaf commanders, had been implicated in the kidnappings of several Filipinos and foreigners. He had good ties with the Moro National Liberation Front, a larger rebel group that has engaged in peace talk with the government, but has been suspected of providing sanctuary and combat support to the more brutal Abu Sayyaf in the past.

“Let us vigorously pursue this terrorist-bandit Abu Sayyaf group with no let-up and destroy them,” military chief of staff Gen. Ricardo Visaya said, promising to pour more troops into Sulu. “We have this one chance to annihilate this menace to society that claims links with the ISIS.”