At least 13 people have been killed after a gunman opened fire in a Rio de Janeiro elementary school, Brazilian officials said.
The gunman - a 23-year-old man who was a former pupil at the school for children aged 10 to 15 - was among the dead, although it is not clear if he shot himself or was killed by police.
Fire department spokesman Evandro Bezerra told the Globo television network that at least 20 people were wounded in the shooting.
Local police commander Djalma Beltrame told Globo TV that the shooter left a letter at the scene indicating he wanted to kill himself, but that it did not give a clear motive for the shooting.
Terrified parents rushed to the school and television images showed them crying and screaming for information about their children.
TV also showed three helicopters landing on a football field next to the school and then ferrying the wounded to nearby hospitals.
The shooting began about 8.30am local time. Witnesses said police responded quickly and traded fire with the gunman.