Philippine soldiers return to camp after an armed encouter with members of the militant group Abu Sayyaf, one of several Muslim gangs on the southern island of Mindanao on August 26, 2016

Muslim extremists who support the Islamic State group staged a daring jailbreak in the southern Philippines, freeing 23 detainees in the latest in a series of mass escapes, officials said Sunday.

About 50 heavily armed members of the Maute group raided the local jail in the southern city of Marawi on Mindanao island on Saturday and freed eight comrades who were arrested barely a week ago, police said.

Fifteen other detainees, held for other serious offences, also escaped in the raid, said provincial jail warden Acmad Tabao.

Police earlier said that 28 inmates escaped but Tabao clarified the figure.

In a report Tabao said two women came to the prison gate, asking the guard to take delivery of some food for the detainees. When the guard opened the gate, hooded men forced their way into the compound.

They overwhelmed the guards, forcing them to their knees and taking two rifles before freeing the inmates.

The hooded men shouted "Allahu Akbar" (God is great) before fleeing in a prison vehicle to a nearby lake. The Maute gang members then fled by boat while the other inmates scattered, Tabao said.

At the jail, two bullet holes and a shattered television set were the only evidence of the attack.

The eight Maute group members were arrested on August 22 after soldiers manning a checkpoint found improvised bombs and pistols in the van they were driving.

The Maute group is one of several Muslim gangs in Mindanao, the ancestral homeland of the Muslim minority in the largely Catholic Philippines.

The group has carried out kidnappings and bombings and is believed to have led an attack on an army outpost in the Mindanao town of Butig in February.

The fighting there lasted a week, leaving numerous fatalities and forcing thousands to flee their homes as helicopter gunships fought off the attackers.

During the Butig fighting the group's members were seen carrying black flags of the Islamic State group, and bandanas bearing the jihadists' insignia were found in their base, the military said.

Authorities said they were investigating the jailbreak and the reason why security had not been increased after high-risk suspects were brought in.

It was the latest of several mass escapes from poorly secured Philippine jails, with the incidents often involving Muslim extremists.

In 2009 more than 100 armed men raided a jail in the strife-torn southern island of Basilan, freeing 31 prisoners including several Muslim guerrillas.

The southern Philippines has been plagued by Muslim separatist insurgencies for over four decades, with the conflict leaving more than 120,000 dead.

President Rodrigo Duterte is pursuing peace talks with the largest Muslim insurgent groups, the Moro National Liberation Front and the Moro Islamic Liberation Front which have ceasefires with the government.

Smaller bands like the Maute group and the Abu Sayyaf group are not covered by the ceasefires and are not part of the peace process.