Doria said the school had been evacuated and police were inspecting what appeared to be possible explosives left by the shooters.
Around 15 others were injured in the shooting, which took place at the Raul Brasil public school in Suzano, on the outskirts of Sao Paulo in southeast Brazil. "He stopped going to school ... because of this", she said.
The shooting happened at about 9.30am local time when the students were on a break at the state school in Suzano, near São Paulo.
Wednesday's shooting ignited debate among political leaders, with some saying armed teachers could have prevented the killings, while others said putting more guns on Brazilian streets will only lead to more deaths.
Sao Paulo governor Joao Doria said on Twitter the "children were cruelly murdered".More news: YouTube Music launches in SA, but how does the price compare?
More news: Aaron Hernandez's first-degree murder conviction to be reinstated, court rules
More news: Apple confirms March event, video streaming service launch likely
It was a horrifying scenes in Sao Paulo, Brazil and the adult who was killed was the principal of the Raul Brasil public Grade school.
Gun laws have been extremely strict in Brazil since 2003 when former leftist President Luiz Inacio Lula de Silva signed measures that prevented ordinary citizens from carrying guns.
Before entering the Raul Brasil school in Suzano near Sao Paulo, the former pupils aged 17 and 25 shot and killed the younger assailant's uncle, who owned a auto rental agency where they stole a vehicle. Among the dead are six school children, two school officials and a person who was standing just outside the school at a nearby carwash, according to Sao Paulo police.
Students gathered outside the school recounted harrowing attacks and seeing several bodies lying in pools of blood.
About 1,000 children attend the school, police said.
"It's a very sad scene, the saddest thing I've seen in my entire life".