Relatives embrace next to the coffin containing the remains of 17-year-old Claiton Antonio Ribeiro, a victim of the mass shooting at the Raul Brasil State School, in Suzano, Brazil, Thursday, March 14, 2019. Classmates, friends and families began saying goodbye on Thursday, with thousands attending a wake in the Sao Paulo suburb while authorities worked to understand what drove two former students to attack the Raul Brasil State School with a gun, crossbows and small axes.

SUZANO, Brazil — Two young men who stormed their former school in southern Brazil armed with a gun, crossbows and axes, killing seven people, were trying to emulate the 1999 Columbine attack in Colorado and had been planning the assault for months, police said Thursday.

Friends and former classmates told investigators that 17-year-old Guilherme Taucci Monteiro and 25-year-old Henrique de Castro were obsessed with the attack on Columbine High School, Sao Paulo civil police director Ruy Ferraz told a news conference. He said the pair had been planning the attack since at least November.

Ferraz said the acquaintances said they didn’t believe the attack would actually happen, or feared that telling anyone would make them targets.

The Colombine attack, also undertaken by two heavily armed young men, left 13 dead. And as in Wednesday’s rampage, the Columbine assailants took their own lives.

Monteiro and de Castro “wanted to prove they could act like in Columbine High School with cruelty and with a tragic character so they could be more recognized than” even the Columbine killers, Ferraz said

Ferraz said a third person, a 17-year-old former student at the school, had been involved in planning but was not present at the school when the attack happened.

He did not identify the accomplice but said police have asked a judge to issue a warrant for the teen’s arrest.

The developments came hours after classmates, friends and relatives of the victims began saying goodbye during a mass wake in the Sao Paulo suburb of Suzano, where the attack happened.

Before launching the school assault, police said the assailants shot and killed Monteiro’s uncle, who owned a used-car dealership nearby. Monteiro had worked at the dealership, but had been fired by his uncle for petty crimes.

What happened next at the K-12 school, partially caught on surveillance camera footage at the building’s entrance and widely distributed in Brazil, was stomach-churning.

It showed Monteiro entering and shooting several people in the head as they tried to run away. De Castro followed, first striking wounded people with an ax and then swinging it wildly while scores of students ran past him. De Castro then armed his crossbow and walked farther into the school.

The dead included five students, a teacher and a school administrator. Nine others were wounded in the attack, including seven still hospitalized Thursday.

“I couldn’t sleep. I have two children in school and they are about the age of the victims,” said Wanda Augusta, a 46-year-old homemaker attending the wake.

“If only we could have identified the difficulties of these boys” before the attack, said Rossieli Soares, the state education secretary, who attended the wake at a volleyball arena. “This is a problem in our society.”

Police seized computers and notebooks from the homes of the two attackers, who were neighbors and lived less than a mile (kilometer) from the school. They also took computers from an arcade near the school that the attackers frequented.

While Latin America’s largest nation has deep problems with violence — it’s the world leader in annual homicides — school shootings like those in the U.S. are rare. Wednesday’s attack reminded many Brazilians of an attack in 2011, when a gunman roamed the halls of a Rio de Janeiro school and killed 12 students.

Joao Camilo Pires de Campos, Sao Paulo state’s public security secretary, summed up what was on the minds of many Brazilians.

“The big question is: What was the motivation of these former students?” he told reporters Wednesday.

Monteiro’s mother, Tatiana Taucci, offered a possible partial answer, saying that her son had been bullied at the school.

“Bullying, they call it. … He stopped going to school … because of this,” she told the Band News TV network.

Still, she said she was as surprised as anyone by her son’s involvement in the attack, which she said she heard about on television like everyone else.

Ferraz, the police director, said that while bullying had been mentioned in some testimony from acquaintances, they did not believe it to be meaningful to the investigation.

Minutes before the school rampage, Monteiro posted 26 photos on his Facebook page, including several with a gun 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.

During the attack, Monteiro opened fire with a .38 caliber handgun and de Castro used a crossbow, de Campos said.

The attackers were also carrying Molotov cocktails, knives and small axes, authorities said.

One of the wounded, Jose Vitor, ran to a hospital close to the school with an ax still lodged in his right shoulder.

The assailants 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 the officers, Monteiro shot de Castro in the head and then shot himself, authorities said.

Katia Sastre, a police officer who was elected to Congress after a video showed her gunning down an armed robber outside her daughter’s school went viral last year, called on authorities to provide better security at schools.

“This could have been prevented if upstanding citizens were able to defend themselves and bear arms,” said Sastre, who is a former student at the school attacked Wednesday.

The debate over whether to expand access to guns, a priority of President Jair Bolsonaro’s administration, was present in many of the public statements by politicians. Soon after his Jan. 1 inauguration, Bolsonaro issued a decree making it easier to buy a gun. His party plans to put forward legislation that would go even further, loosening restrictions on carrying and the number and types of firearms Brazilians can own.

A Wisconsin man was sentenced Friday to life in prison for kidnapping 13-year-old Jayme Closs and killing her parents in a case that mystified authorities for months until the girl made a daring escape from the remote cabin where she was held for 88 days.

LONDON — Theresa May announced Friday that she will step down as U.K. Conservative Party leader on June 7, admitting defeat in her attempt to take Britain out of the European Union and sparking a contest to become the country’s next prime minister. She will stay as caretaker prime minister until the new leader is chosen, a process likely to...