MANILA — Two bombs exploded at a cathedral in the southern Philippines on Sunday, killing 20 people and wounding scores of others, officials said.

The attack on the island of Jolo came less than a week after voters rejected its inclusion in a Muslim autonomous area; the referendum was overwhelmingly approved in other parts of the Mindanao island group, which includes Jolo. The government of the mainly Catholic country has for decades been fighting Islamist separatist groups like Abu Sayyaf and the Islamic State.

The blasts occurred in the morning as people were gathered for Mass at the Cathedral of Our Lady of Mount Carmel in Jolo, the capital of Sulu Province, said Col. Gerry Besana, a spokesman for the military. The bombs were believed to be homemade.

He said one of the bombs exploded inside the church, while the other exploded in a nearby parking lot as congregants panicked and rushed outside.