A ninth-grade student in the Philippines allegedly shot and killed a schoolmate before taking his own life in a shocking incident at a Catholic university in western Mindanao.

The shooting occurred on Tuesday at Ateneo de Zamboanga University, marking the second school shooting reported in the country within two months.

Regional police spokesperson Shella Chang said the suspect entered a classroom where the victim was present and opened fire. He then reportedly moved to the fifth floor of the institution, where he shot himself.

Interior Secretary Victor Remulla separately confirmed that the student had livestreamed the incident on social media. The Facebook account believed to belong to the suspect has since been deactivated.

Footage shared by local media showed what appeared to be the barrel of a firearm moving through a school corridor before the weapon was aimed into a classroom and fired. Students dressed in school uniforms could be heard screaming as they attempted to escape.

Authorities had not immediately confirmed whether anyone else was injured in the attack.

The Philippine National Police has launched an investigation to establish what prompted the shooting, determine who owned the firearm and trace how the weapon was brought onto the school premises, according to the Interior Ministry.

The identities and ages of the student who carried out the attack and the victim had not been released by police.

University president Father Guillrey Andal confirmed the two deaths and expressed sadness over the incident. He said the institution was working with investigators to identify the victims so their families could be formally notified.

Andal added that the university had been preparing an active-shooter simulation before the incident because of growing concerns over the safety of students and staff.

School shootings remain uncommon in the Philippines. However, an attack at another school in the central part of the country in June left three teenagers dead and 20 others injured.

Following that incident, Ateneo de Zamboanga was among schools nationwide that conducted active-shooter preparedness drills.

Although civilian firearm ownership is subject to strict regulation in the Philippines, authorities have long faced challenges posed by the illegal firearms trade.