Among the dead were five school children, one adult who worked at the building and the two adolescent shooters, police said.
An unknown number of additional children were also shot at the Raul Brasil elementary school and taken to hospitals. The state of their health was not immediately known.
School shootings are rare in Brazil, even though the country is one of the world’s most violent, with more annual homicides than any other. The last major school shooting was in 2011, when 12 children were shot dead by a former pupil in Rio de Janeiro.
While gun laws are extremely strict in Brazil, it is not difficult to illegally purchase a weapon.
Police said that two adolescents wearing face masks entered the building and started shooting at about 9:30 a.m. local time. The pair eventually shot and killed themselves.
Police told the Globo TV network that another shooting took place about 500 meters from the Raul Brasil school shortly before the killings at the school, but it was not yet clear if the two incidents were related.
(Production: Pablo Garcia, Leandra Camera)