The last major school shooting attack in the country was in 2011, when a former student killed 12 children in Rio de Janeiro. Police also said that the hooded gunmen killed themselves after the attack.
"We still can not tell if the cases are related", said Captain Cibele Marsolla, of the military police's communication department.
While gun crime is common in Brazil, mass shootings like this nature are not.More news: Patriots hosting former Broncos tight end for free agent visit
Ten people, including the two attackers, were killed in total, Sao Paulo police said.
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. It was not immediately clear whether the two incidents were linked.
Neighbors who heard commotion coming from the school looked outside their windows and doors to see terrified students jumping over a fence that surrounded the building and running down the street. One student was shot in the back and another had suffered injuries to a knee.
Salles said the gunmen used at least one.38 caliber pistol and speed loaders, along with a crossbow, knives, a compound bow and arrow and several Molotov cocktails.More news: Winter X Games awarded to Calgary in 3-year deal
He added that the school had been evacuated and police were inspecting possible explosives left by the shooters.
Sao Pulo governor, Joao Doria, decreed a three-day official mourning, with flags at half-mast, for the 10 deaths occurred this Wednesday after a school shooting in the state.
"I was shocked with the scenes I saw inside that school".More news: New Line Cinema Sets Sopranos Prequel Film For September 2020