Gov. Joao Doria said the two attackers, who entered the building and started shooting around 9:30 a.m. local time, were believed to be between 20 and 25 years old.
Marilene Gonçalves, a 51-year-old housewife who lives near the school, went outside when she heard gunshots and screams. More than 1,000 children aged between 11 and 15 attend classes there.
But school shootings are rare.
São Paulo state governor João Doria tweeted that the victims had been "cruelly murdered".More news: United States senator vows to seek recognition of Israeli rule in Golan
Sao Paulo Commander of Police Forces Marcelo Salles said that the gunmen used "at least one.38 caliber pistol, along with homemade bombs and a crossbow" in an attack that was an "unspeakably brutal crime".
Wednesday's shooting happened in a public school in Suzano, a suburb of Sao Paulo, Brazil's largest city.
Brazil is one of the most violent countries in the world with 64,000 murders in 2017, a rate of nearly 31 per 100,000 inhabitants - that's three times higher than the level the United Nations classifies as endemic violence.
While gun laws are extremely strict in Brazil, it is not hard to illegally purchase a weapon. The last major incident of this type occurred back in 2011, when 12 schoolchildren were shot dead in Rio de Janeiro by a former student.More news: India to clash with Australia in 5th ODI on March 13
Website UO1 said the two killers, "probably teenagers, entered the school shooting with their heads covered by a hood".
The attack comes after Brazilian President Jair Bolsonaro announced that the country's gun ownership controls would be eased.
After shooting at students in the yard, the killers "headed to the language center" where several pupils were hiding and "committed suicide in a corridor", added Sales.
Police say they found a revolver, a bow and arrow and items that appeared to be explosives inside.More news: #Trashtag: the eco-conscious social media challenge that's gone viral
"It's a very sad scene, the saddest thing I've seen in my entire life".
- Major Winter Storm Grounds Flights, Closes Parts Of Interstates
- Facebook, Whatsapp and Instagram are down for many
- Facebook filed a lawsuit against the Ukrainians
- Murray throws at his pro day, meets with Giants
- YouTube Music Launches in India: Everything You Need to Know
- NASA's new rocket won't be ready for moon shot next year
- Fiat Chrysler to Recall 862520 US Vehicles over Excess Emissions
- Chrome 73 finally supports dark mode on Mac
- Collins to Redskins for 6 years, $84M
- Felicity Huffman Released from Custody on $250K Bond Amid College Admissions Scam