It was not clear whether the gunman, who is believed to be a former student at the school, shot himself or was killed by police.
At least 20 people, including children, were wounded in the shooting at the school for students aged 10 to 15, fire department spokesman Evandro Bezerra told the Globo television network.
The Wall St. Journal reports that nine girls and one boy were killed.
A fire department spokeswoman confirmed for The Associated Press that there were deaths, but she did not know how many. She spoke on condition of anonymity as she was not authorized to discuss the matter.
Terrified parents rushed to the school and television images showed them crying and screaming for information about their children.
The gunman was a 23-year-old man and former student at the school, a police spokeswoman told the AP. She also spoke on condition of anonymity, saying that she was not authorized to discuss the matter.
Local police commander Djalma Beltrame told Globo TV that the gunman left a letter at the scene indicating he wanted to kill himself, but that it did not give a clear motive for the shooting.
Television images 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:30 a.m. local time (7:30 a.m. EDT; 1130 GMT). Witnesses said police responded quickly and traded fire with the gunman.