MANILA — Five soldiers and three members of Abu Sayyaf, a militant group linked to the Islamic State, were killed in a gun battle on Saturday on the southern Philippine island of Jolo, six days after a church bombing linked to the group left 22 dead, the military said.

The fighting occurred in the jungles around the town of Patikul on Jolo, where the soldiers have been on the trail of an Abu Sayyaf unit blamed for an attack on the Cathedral of Our Lady of Mount Carmel last Sunday.

Twin explosions rocked Mount Carmel Cathedral, in downtown Jolo, as worshipers celebrated Mass. After the initial death toll of 21, a 68-year-old woman who was among the 100 or so others wounded died of her injuries on Friday.

President Rodrigo Duterte and the military blamed the church attack on “suicide bombers” deployed by Abu Sayyaf working in concert with the Islamic State group.