The dead included three leaders and a fourth member of the al Qaeda-linked Abu Sayyaf, a group notorious for deadly attacks and ransom kidnappings in which hostages have been beheaded.
The crisis began with an Abu Sayyaf suspect snatching a guard's weapon and quickly turned into a prolonged standoff with at least 10 of the group's top suspects leading the rebellious inmates. Three guards and 24 inmates died — 22 in Tuesday's assault to take back the prison. A police officer also was killed, his body discovered under debris hours after the operation ended.
Sweat-soaked police marksmen filed out of the building after the assault to the applause of bystanders, escorting prisoners stripped to their underwear and with hands clasped behind their heads.
"The terrorists got what was coming to them," Ignacio Bunye, press secretary for President Gloria Macapagal Arroyo, said in a statement. "The crisis team gave them all the chances to peacefully surrender."
The raid began after authorities gave the inmates a 15-minute deadline to surrender — an ultimatum that came after hours of fruitless negotiations. Six officers were wounded in the assault, which saw some detainees scale down walls inside the compound as thick smoke billowed out.
The inmates had agreed to surrender after their failed jailbreak Monday, but the deal broke down when they demanded food first, prompting civilian negotiators to leave in frustration.
The bloody assault raised fears of retaliatory attacks. Even as Arroyo congratulated police, an Abu Sayyaf leader warned of repercussions.
"To you people, you don't have to bring the war to Mindanao," Abu Sulaiman told DZBB radio, referring to the Muslim homeland in the south where the military has launched offensives against militants. "We will bring it right into your doorstep."
The inmates had warned of bombings if there was an assault on the jail. No one doubted that the Abu Sayyaf has the means and willpower to carry them out.
"Of course that's our concern," national police chief Arturo Lomibao said. "We hope there's going to be no retaliatory strikes from our Muslim brothers because they know what happened here. We tried to resolve it peacefully."
Three leaders were among four Abu Sayyaf members killed: Alhamzer Manatad Limbong, known as Kosovo; Ghalib Andang, known as Commander Robot; and Nadzmie Sabtulah, alias Commander Global.
Limbong allegedly was involved in a mass kidnapping in 2001-02 that left several hostages — including two Americans — dead, and a ferry bombing a year ago that killed more than 100 people in the Philippines' worst terrorist attack. Others were accused of ransom kidnappings and other criminal acts.
Officials said police found eight handguns and two unexploded grenades in the jail after the assault on Camp Bagong Diwa in suburban Manila. The maximum security prison has about 425 inmates, including 129 suspected members and leaders of Abu Sayyaf.
At least three guards and two Abu Sayyaf members were killed in the initial escape attempt, police said.
The militants generated little sympathy from terrorism-weary Filipinos.
"Throughout the day, the nation had to listen to the demands of people who had just killed three jail guards and were on trial for multiple murder and kidnapping," The Philippine Star daily wrote in an editorial. "And we wonder why the country is turning into a terrorist paradise."
But in the restive south, where insurgencies for Muslim self-rule have been raging for the last three decades, the prison assault was bound to be seen as heavy-handed.
The government has frequently described Abu Sayyaf as a spent force and its leaders on the run from U.S.-backed military assaults. But recently, officials said about 300 members have teamed up with local bandits and militants for training, shelter and sharing of resources and combatants, indicating the fight is far from over.
Several Abu Sayyaf suspects have escaped from Philippine jails, which are often dilapidated, with inadequate and sometimes corrupt staff.
State prosecutor Peter Medalle, who handles Abu Sayyaf cases, said guards at Camp Bagong Diwa were tipped off about a possible prison break three weeks ago. "Apparently, our warnings were ignored," he said.