RIO DE JANEIRO, Brazil — A gunman roamed the halls of an elementary school in Rio de Janeiro on Thursday and killed 12 children, lining them up against a wall and shooting them in the head at point-blank range as he shouted, "I'm going to kill you all!"
Police were alerted to the shootings when two boys, at least one of whom had a gunshot wound, ran up to two officers on patrol about two blocks away. One officer said he saw the gunman on the second floor and traded shots with him.
"He saw me and aimed a gun at me," said Officer Marcio Alves. "I shot him in the legs. He fell down the stairs and then shot himself in the head."
Images taken with a cell phone and posted on YouTube showed students fleeing wildly and screaming for help, many with their shirts soaked in blood.
At least 12 people, mostly students, were injured, many by gunfire, and taken to local hospitals, a health official said. At least two were in grave condition.
The dead included 10 girls and two boys, plus the gunman, officials said. The ages of the children were not immediately known.
The gunman was identified as Wellington Oliveira, 23, who had once attended the Tasso da Silveira school in a working-class neighborhood in western Rio.
No motive was known, but authorities said the shooter left a rambling and mostly incoherent letter at the scene indicating he wanted to kill himself. The letter also explained in detail how Oliveira wanted his corpse to be cared for — bathed and wrapped in a white sheet that he had left in a bag in the first room where he said he would start shooting.
Brazilian President Dilma Rousseff, attending an event in the capital, Brasilia, lamented the deaths of "defenseless children." Her voice cracking and her eyes welling with tears, she added, "It's not in the nature of our nation to have these types of crimes."