MANILA, Philippines — Two bombs tore through a Roman Catholic cathedral on a southern Philippine island where Muslim militants are active, killing at least 21 people and wounding more than 70 during a Sunday Mass, officials said.

The first bomb went off in or near the Jolo cathedral in the provincial capital, followed by a second blast outside the compound as government forces were responding to the attack, security officials said. The blasts blew away the entrance to the cathedral and ripped through the main hall, shredding to pieces the pews and toppling other doors.

Police said at least 21 people died and 71 were wounded. The dead included 14 civilians and seven soldiers, said Chief Superintendent Graciano Mijares, police director for the Autonomous Region in Muslim Mindanao.

Photos showed debris and bodies lying on a busy street outside the Cathedral of Our Lady of Mount Carmel, which has been hit by bombs in the past. Troops in armored carriers sealed off the main road leading to the church while vehicles transported the dead and wounded to the hospital. Some casualties were evacuated by air to nearby Zamboanga city.

“I have directed our troops to heighten their alert level, secure all places of worships and public places at once, and initiate pro-active security measures to thwart hostile plans,” said Defense Secretary Delfin Lorenzana in a statement.

“We will pursue to the ends of the earth the ruthless perpetrators behind this dastardly crime until every killer is brought to justice and put behind bars. The law will give them no mercy,” the office of President Rodrigo Duterte said in Manila.

It said that “the enemies of the state boldly challenged the government’s capability to secure the safety of citizens in that region. The (Armed Forces of the Philippines) will rise to the challenge and crush these godless criminals.”

Jolo island has long been troubled by the presence of Abu Sayyaf militants, who are blacklisted by the United States and the Philippines as a terrorist organization because of years of bombings, kidnappings and beheadings. A Catholic bishop, Benjamin de Jesus, was gunned down by suspected militants outside the cathedral in 1997.

No one has immediately claimed responsibility for the latest attack.

It came nearly a week after minority Muslims in the predominantly Roman Catholic nation endorsed a new autonomous region in the southern Philippines in hopes of ending nearly five decades of a separatist rebellion that has left 150,000 people dead. Although most of the Muslim areas approved the autonomy deal, voters in Sulu province, where Jolo is located, rejected it. The province is home to a rival rebel faction that’s opposed to the deal as well as smaller militant cells that not part of any peace process.

Western governments have welcomed the autonomy pact. They worry that small numbers of Islamic State-linked militants from the Middle East and Southeast Asia could forge an alliance with Filipino insurgents and turn the south into a breeding ground for extremists.

“This bomb attack was done in a place of peace and worship, and it comes at a time when we are preparing for another stage of the peace process in Mindanao,” said Gov. Mujiv Hataman of the Autonomous Region in Muslim Mindanao. “Human lives are irreplaceable,” he added, calling on Jolo residents to cooperate with authorities to find the perpetrators of this “atrocity.”

Security officials were looking “at different threat groups and they still can’t say if this has something to do with the just concluded plebiscite,” Albayalde, the national police chief, told ABS-CBN TV network.

Aside from the small but brutal Abu Sayyaf group, other militant groups in Sulu include a small band of young jihadis aligned with the Islamic State group, which has also carried out assaults, including ransom kidnappings and beheadings.

Abu Sayyaf militants are still holding at least five hostages — a Dutch national, two Malaysians, an Indonesian and a Filipino — in their jungle bases mostly near Sulu’s Patikul town, not far from Jolo.

Government forces have pressed on sporadic offensives to crush the militants, including those in Jolo, a poverty-wracked island of more than 700,000 people. A few thousand Catholics live mostly in the capital of Jolo.

There have been speculations that the bombings may be a diversionary move by Muslim militants after troops recently carried out an offensive that killed a number of IS-linked extremists in an encampment in the hinterlands of Lanao del Sur province, also in the south. The area is near Marawi, a Muslim city that was besieged for five months by hundreds of IS-aligned militants, including foreign fighters, in 2017. Troops quelled the insurrection, which left more 1,100 mostly militants dead and the heartland of the mosque-studded city in ruins.