A Grade 9 student at Ateneo de Zamboanga University in the southern Philippine city of Zamboanga shot and killed a fellow student before taking his own life on Tuesday, in what officials said was the second fatal school shooting in the country in two months.

The suspect, identified by police as Mohammad Mael Jalani, carried two pistols and livestreamed the attack using a body-worn camera, according to police and other officials. Hundreds of students were evacuated from the high school building after gunshots were heard. Two other people were injured in the incident, police and city officials said.

According to an initial police report, Jalani fired at a teacher sitting in front of a class but apparently missed. He then shot a student on the fourth floor of the building before going up one floor and killing himself.

Interior Secretary Jonvic Remulla told reporters, "He entered and started indiscriminately firing, hitting a Grade 10 student at the fourth floor then subsequently went to the fifth floor and jumped from the said building and committed suicide."

Remulla said the suspect showed the attack on Facebook Live, starting as he climbed the stairs, but only snippets were visible. "We'll look into his gaming history and his chat history so we cannot come up with a complete answer why this happened until we do a complete forensic analysis," he said.

Zamboanga City Mayor Khymer Adan Olaso and police said the suspect shot himself.

The high school building, where the shooting occurred, is in a secured campus separate from the larger campus of the privately owned Catholic university, which houses its colleges and professional schools. Ateneo de Zamboanga is one of the largest and most prestigious universities in the southern Philippines. It suspended classes at all levels Tuesday and Wednesday following the attack.

A parent, Joe Darryl Jaron, who had just dropped off his child, heard the gunshots and recorded a video of the commotion as students screamed and ran for safety.

The shooting took place despite police assurances that school security across the country would be strengthened after a June shooting in Tacloban City, where three high school students were killed and at least 20 others wounded. Police arrested two teenagers, ages 14 and 15, in connection with that attack. Days after the Tacloban shooting, Philippine authorities temporarily blocked the online gaming app Gorebox to investigate whether it played a role in fostering violence.

The Zamboanga shooting also occurred less than two weeks after a school shooting in Thailand, where a 14-year-old boy killed his grandparents, five school staff members, and a 12-year-old student in Nonthaburi province outside Bangkok. In response, Thailand's Prime Minister Anutin Charnvirakul took steps to restrict guns in the country, which has the highest rate of gun ownership in Asia, according to officials.