An 18-year-old man wielding a sharp object forced his way into a preschool in southern Brazil and killed three children and two caregivers.
Another child was injured in the attack on the Aquarela preschool in the town of Saudades, military police spokesperson Major Rafael Antonio da Silva told dpa from the state of Santa Catarina.
It was initially thought that two children had died, but the Saudades Mayor Maciel Schneider, confirmed a third death in comments to Brazilian television.
"This is the saddest day in our history," Schneider said.
"We don't really know how to act now. This is my first term in office, I'm 35 years old, I have a small child."
Local Education Secretary Gisela Hermann called it a "scene of horror," in comments to news site G1.
A witness said caregivers hid the children in the changing room and locked the door. The children killed were under two years old, according to G1.
State Governor Daniela Reinehr declared three days of mourning.
Police said the motive for the attack was still under investigation and it was not known whether the assailant had psychological problems.
According to the newspaper Folha de S.Paulo, he had no criminal record and had not attended the preschool.
Local residents apprehended the attacker before police arrived.
He seriously injured himself and was taken to hospital in Chapeco, 70 kilometres away. His parents were said to be in shock.
Police searched his home, including his computer.