Two masked men armed with a gun, knives, axes and crossbows descended on a school in southern Brazil on Wednesday, killing five students and two adults before one killed the other and then himself, authorities said.

The men, identified as former students at the school, ages 17 and 25, also shot and killed the owner of a used car business nearby before launching the attack on the school in Suzano, a suburb of Sao Paulo, Brazil's largest city, authorities said.

Besides the five students, the dead included a teacher and a school administrator, said Joao Camilo Pires de Campos, the state's public secretary. Nine others were wounded in the school attack and hospitalized, he said.

"This is the saddest day of my life," de Campos said.

'It is horrendous'

"The big question is: what was the motivation of these former students?" de Castro said.

A man comforts a woman at the Raul Brasil Professor school in Suzano outside of Sao Paulo following the shooting Wednesday that left at least eight dead. (Andre Penner/The Associated Press)

Authorities identified the attackers as 17-year-old Guilherme Taucci Monteiro and 25-year-old Henrique de Castro.

The 17-year-old opened fire with a .38 caliber handgun and the 25-year-old used a crossbow, de Campos said, adding that forensics would determine how the victims died. Authorities said they were also carrying Molotov cocktails.

"In 34 years as a policeman, it's the first time I've seen someone use a crossbow like that," police Col. Marcelo Salles said. "It is horrendous."

The attackers were trying to force their way inside a room at the back of the school where many students were hiding when police arrived. Instead of facing police, they turned their weapons on themselves, authorities said without elaborating.

Mother of shooter says he was bullied

The 17-year-old's mother, Tatiana Taucci, offered a possible answer, telling Band News while hiding her face from the camera that her son had been bullied at the school.

"Bullying, they call it ... He stopped going to school ... because of this," she said.

She said she was surprised by his involvement and found out about the attack from the television like everyone else.

Forensic vehicles transported the bodies of the people who were killed in the school shooting. (Andre Penner/The Associated Press)

Minutes before the attack, the teen had posted 26 photos on his Facebook page, included several with guns and one that showed him giving the middle finger as he looked into the camera.

In some of the photos, he wore a black scarf with a white imprint of a skull and cross bones. No text accompanied the posts.

By Wednesday afternoon, Facebook had taken down his page.

'We heard 3 pops'

The public school, Raul Brasil Professor (translated in English), has more than 1,600 students from elementary to high school grades, teachers said. Students gathered outside the school recounted harrowing attacks and seeing several bodies lying in pools of blood.

"We were at recess and eating like normal, and we heard three pops, then we tried to run to jump over the walls," Rosni Marcelo Grotliwed, 15, told G1 news portal.

"My friend was stabbed in the shoulder and my other friend was shot," she said. "I escaped with one friend and went home and then came back to look for another friend."

Police officers guard the entrance of the school. (Mauricio Sumiya/Futura Press via Associated Press)

Kelly Milene Guerra Cardoso, 16, said she and other students took refuge in the school's cafeteria, locked the door and lay on the floor.

"We stayed there until the door was opened. We thought it was the shooters coming to get us, but it was the police," she said. "They told us to start running."

Horacio Pereira Nunes, a retiree whose house is next to the school, said he began hearing shots around 10 a.m.

"Then a lot of kids started running out, all screaming," he said. "It didn't take long until police arrived."

School shootings rare in Brazil

Latin America's largest nation has the highest number of annual homicides in the world, but school shootings are rare.

The last major school shooting was in 2011, when 12 children were shot dead by a former pupil in Rio de Janeiro.

In 2011, 12 students were killed by a gunman who roamed the halls of a school in Rio de Janeiro, shooting at them.

President Jair Bolsonaro ran on a platform that included promises to crack down on criminals, in part by expanding public access to guns.

Soon after his Jan. 1 inauguration, Bolsonaro issued a decree making it easier to buy a gun.

"A monstrosity and cowardness without equal," Bolsonaro wrote in a tweet expressing his sympathies for the families of the victims of Wednesday's attacks.

Presto minhas condolências aos familiares das vítimas do desumano atendado ocorrido hoje na Escola Professor Raul Brasil, em Suzano, São Paulo. Uma monstruosidade e covardia sem tamanho. Que Deus conforte o coração de todos! —@jairbolsonaro

Similar to arguments made by proponents of less gun regulation in the United States, Bolsonaro and his supporters argue that expanded access to guns will combat crime.

Sen. Major Olimpio, a member of Bolsonaro's party and a proponent of loosening gun legislation, again made that argument hours after Wednesday's rampage.

"We can't let those who take advantage of this tragedy speak about how disarmament is the solution," he tweeted, adding: "Weak and shameful 'disarmament farce,' which gave guns to criminals and prevented self-defence."