Islamic State has claimed responsibility for twin bombings that killed at least 20 people during a Catholic Church service in the Philippines, the militant group’s news agency Amaq says.

The attack on Sunday on a predominantly Muslim island in the country’s volatile south wounded 81 people, and was one of the deadliest in recent years in a region long plagued by instability.

The first explosion went off inside the cathedral on Jolo Island in Sulu Province, which shattered pews, broke windows and left bodies strewn inside the cathedral as mass was being celebrated.

Moments later a second explosion outside killed troops who were rushing to help the wounded in the smoking and heavily damaged.

Pope Francis condemned the deadly attack while at a Panama hospice for AIDS sufferers on the last day of a trip there.

Francis said the violence caused “more mourning in the Christian community”.

“I pray for the dead and the injured. May the Lord, Prince of Peace, convert the hearts of the violent ones,” the Pope said.

Islamic State claimed responsibility for the attack, issuing a formal communique saying two suicide bombers had detonated explosive belts, according to the SITE Intelligence Group which monitors jihadist activities.

But a military report said the second bomb was left in the utility box of a motorcycle in the parking area outside the church.

Manila swiftly vowed to hunt down the attackers.

“We will pursue to the ends of the earth the ruthless perpetrators behind this dastardly crime,” presidential spokesman Salvador Panelo said in a statement.

“The law will give them no mercy.”

Mr Panelo added: “The enemies of the state have boldly challenged the capability of the government to secure the safety of the citizenry in that region.”

“The armed forces of the Philippines will rise to the challenge and crush these godless criminals.”

Earlier, police suspected the attack were the work of Abu Sayyaf, a militant group that has pledged allegiance to IS and is notorious for its bombings and brutality.

Pictures distributed by the military of the inside of the Jolo church showed several rows of wooden pews destroyed, with debris strewn across a blackened floor.

The blasts came six days after a referendum on autonomy for the mainly Muslim region returned an overwhelming “yes” vote.

The attack followed the announcement that the region, a mainly Muslim part of the predominantly Catholic Philippines, had ratified the creation of an autonomous area called Bangsamoro, with 85 per cent of voters behind it. Although Sulu was among only a few areas that rejected autonomy, it will still be part of the new entity when it is fully formed in 2022.

Defence Secretary Delfin Lorenzana called the attack a “dastardly act” and urged the population to co-operate and “deny terrorism any victory”.

National Security Adviser, Hermogenes Esperon, called those responsible “mass murderers” and “extremist criminals”.

“We will not allow them to spoil the preference of the people for peace,” he added.

Civilians bore the brunt of the attack, which also killed five soldiers.

Police lowered the death toll from 27 to 20, after discovering duplications in initial records.