KIDAPAWAN, Philippines -- More than 100 suspected Muslim rebels stormed a jail in the southern Philippines before dawn Wednesday, allowing 158 inmates to escape in what officials said was the biggest jailbreak in the country.

Six of the inmates were killed in firefights with pursuing police and army troops, while eight others have been caught and were being returned to the facility, said Senior Inspector Xavier Solda, spokesman for the Bureau of Jail Management and Penology.

Solda said the heavily armed gunmen emerged from a forest and attacked the North Cotabato District Jail in Kidapawan under the cover of darkness. Kidapawan city in Cotabato Province is about 580 miles southeast of the capital Manila.

Get Breaking News Delivered to Your Inbox

“To my knowledge, this is the biggest jailbreak in the history” of the bureau, Solda said in a telephone interview.

Acting Provincial Jail Warden Supt. Peter John Bongngat Jr. said one of the about 20 prison guards on duty was killed and an inmate was wounded in an initial gun battle.

Prison officials (L) inspect the perimeter fence of the district jail, where more than a hundred inmates esaped from, in the town of Kidapawan on the southern island of Mindanao on January 4, 2017, as other inmates (R) remain in the prison compound. Getty

Bongngat and Kidapawan police chief Supt. Leo Ajero said gunfire continued for hours after the attack as army troops and police, some in armored tanks, hunted through the surrounding forests for the escaped inmates and the gunmen who freed them.

Bongngat said the attackers were suspected to include members of the outlawed Bangsamoro Islamic Freedom Fighters and guerrillas who broke away from the main Moro Islamic Liberation Front, which has signed a peace deal with the government.

The jail held 1,511 inmates, including Bangsamoro members facing murder charges for a series of bombings in the province, officials said. It was the third attack on the provincial jail facility since 2007.

Local village leader Alexander Austria told The Associated Press by telephone that he and his men captured one escaped man.

He said the gunfire woke his village, which was several miles from the prison, and he immediately posted guards because of worries the attackers and escaped inmates could enter the village.

“We heard the gunfire and we sprang into action to guard our village,” Austria said. “We were afraid the escapees could try to enter our village to hide or take hostages.”