The president of the Philippines has blamed “foreign terrorists” for a bomb blast that killed four Catholic worshippers and injured dozens of other people in the south, and sparked alarm, including in the capital, Manila, where state forces were put on alert.

The suspected bomb, which the police said was made from a mortar round, exploded while students and teachers were attending Mass in a gymnasium at Mindanao State University in southern Marawi city on Sunday morning, Taha Mandangan, the security chief of the state-run campus, told the Associated Press.

Dozens of students and teachers dashed out of the gym and the wounded were taken to hospitals.

Philippines Deadly Explosion
Students and teachers were attending Mass in a gymnasium at Mindanao State University when the bomb went off (Froilan Gallardo/AP)

Regional military commander Major Generak Gabriel Viray III said four people were killed by the blast, including three women, and 50 others were taken to two hospitals for treatment.

Six of the injured are fighting for their lives, said Mamintal Adiong Jr, governor of the Islamic province of Lanao del Sur, which has Marawi as its capital.

President Ferdinand Marcos Jr said in a statement: “Extremists who wield violence against the innocent will always be regarded as enemies to our society.

“I condemn in the strongest possible terms the senseless and most heinous acts perpetrated by foreign terrorists upon the Mindanao State University.”

Mr Marcos did not explain why he immediately blamed foreign militants for the high-profile bombing.

Defence Secretary Gilberto Teodoro Jr later told a news conference without elaborating that there was a strong indication of a “foreign element” in the bombing.

Philippines Deadly Explosion
Dozens of people were taken to hospital after the blast (Froilan Gallardo/AP)

Military chief of staff General Romeo Brawner Jr said the bomb attack could be retaliation by Muslim militants for a series of battle setbacks.

“We are looking at possible angles,” he said. “It could be a retaliatory attack.”

He cited the killing of 11 suspected Islamic militants in a military offensive backed by air strikes and artillery fires on Friday near Datu Hoffer town in southern Maguindanao province.

Regional police director Brigadier General Allan Nobleza said the killed militants belonged to Dawlah Islamiyah, an armed group that had aligned itself with the Islamic State group and still has a presence in Lanao del Sur province.

Mosque-studded Marawi city came under attack from foreign and local Islamic militants who had associated themselves with the Islamic State group in 2017.

The five-month siege left more than 1,100 dead, mostly militants, before it was quelled by Philippine forces backed by air strikes and surveillance planes deployed by the United States and Australia.

Philippines Deadly Explosion
A Filipino trooper guards the entrance of the site where a bomb exploded in Marawi, southern Philippines (Froilan Gallardo/AP)

Army troops and police cordoned off the university shortly after the bombing and began an investigation, checking security cameras for any indication of who may have been responsible for the attack. Security checkpoints were set up around the city.

Police Lieutenant General Emmanuel Peralta told reporters that military and police bomb experts found fragments of a 60mm mortar round at the scene of the attack.

Such explosives fashioned from mortar rounds have been used in past attacks by Islamic militants in the country’s south.

The deadly blast set off a security alarm beyond Marawi city as the Christmas season ushered in a period of travel, shopping sprees and traffic jams across the country.

Police and other state forces were put under “heightened alert” in metropolitan Manila, security officials said.

Philippines Deadly Explosion
Filipino troopers man a checkpoint near the site where a bomb exploded in Marawi, southern Philippines (Froilan Gallardo/AP)

The Philippine coast guard said it ordered all its personnel to intensify intelligence gathering, stricter inspections of passenger ferries and the deployment of bomb-sniffing dogs and sea marshals.

“Amid this barbaric act, best public service must prevail,” coast guard chief Admiral Ronnie Gavan said.

The southern Philippines is the homeland of minority Muslims in the predominantly Roman Catholic nation and the scene of decades-old separatist rebellions.

The largest armed insurgent group, the Moro Islamic Liberation Front, signed a 2014 peace deal with the government, considerably easing decades of fighting.

But a number of smaller armed groups rejected the peace pact and press on with bombings and other attacks while evading government offensives.