The children begged him to stop but still he gunned them down, most with a bullet to the head from close range.
By the time Wellington Menezes de Oliveira, 23, shot himself with one of the two revolvers he took to Tasso da Silveira school in Rio de Janeiro, he had killed 10 girls and two boys, believed to be aged between 11 and 13.
Witnesses said he told school officials he was there to give a speech, then began shooting at students, repeatedly yelling: "I'm going to kill you all!"
"He had already killed a lot of children in the first floor and in the yard," student Jade Ramos told the Globo television network.
"He kept telling the kids to face the wall and was shooting at their heads. The children kept begging, 'No, please!' There was a lot of blood, children agonising on the stairs."
Police were alerted when two boys, at least one with a wound, ran up to two officers on patrol about two blocks away. The officers sprinted to the school and at least one quickly located the gunman on the second floor and traded shots with him.
"He saw me and aimed a gun at me," officer Marcio Alves said. "I shot him in the legs, he fell down the stairs and then shot himself in the head."
The mass killing, the first to hit Brazil, left the nation searching for answers. President Dilma Rousseff wept during a speech to business leaders and requested a moment of silence for the victims.
"This type of crime is not characteristic of [our] country and therefore we are all ... united in repudiating this act of violence," Rousseff said.
Police are now trying to piece together what led the former student at the school to become Brazil's first school serial killer.
Police said they believed Oliveira was mentally unstable, citing the content of a suicide note, which asks that his body be bathed and wrapped in a white sheet that he left in a bag in the first room where he said he would start shooting. The letter also states that he should not be touched by anyone who is "impure" unless they wear gloves.
"If possible I want to be buried next to my mother. A follower of God must visit my grave at least once. He must pray before my grave and ask God to forgive me for what I have done," read the letter, which was posted on the Globo television network's website.
Edmar Peixoto, the deputy mayor of western Rio, said the letter also stated that the gunman had the Aids virus.
Oliveira's neighbours told the newspaper Jornal do Brasil they could not believe the quiet young man who kept his head down and stayed out of trouble was responsible for so much bloodshed.
"He was never violent; he didn't get in trouble, throw stones or fight in the streets," said Edna de Lira Ferreira, 55. "He was just quiet, and we respected the way he was. He just stayed in his room, in front of the computer."
Oliveira had been a Jehovah's Witness, like his adoptive parents and their other children, Ferreira said.
Another neighbour, Elma Pedrosa, remembered Oliveira as an unusual youth who looked away when he passed acquaintances rather than greet them.
"He was antisocial, but he never demonstrated any violent tendencies," she said.
Rio police chief Martha Rocha said the gunman had no criminal history.
But, even in a city rife with drug-gang violence in its vast slums, the shooting shocked seasoned police.
"What happened in Rio is without a doubt the worst incident of its kind to have taken place in Brazil," said Guaracy Mingardi, a crime and public safety expert at the University of Sao Paulo.
Rio Mayor Eduardo Paes said life at the four-storey, pastel yellow and green school was turned into a "hellish nightmare".
"This day would have been so much worse if it weren't for the hero policeman," Paes told reporters at the school.
- AGENCIES
Don't shoot, children beg
AdvertisementAdvertise with NZME.