Six children and two employees at the school were killed better the two men, who were carrying several weapons, took their own lives.
São Paulo state governor João Doria tweeted that the victims had been "cruelly murdered".
Two gunmen open fire on students of the Raul Brasil State School in the city of Suzano in Greater São Paulo.
President Trump's Comment on Budget Proposal
The 2020 budget proposal would slash ED's budget by 10 percent at the program level or $8.5 billion, down to $62 billion. Some fiscal watchdogs, though, panned the effort as more piling on of debt by Trump with no course correction in sight.
Website UO1 said the two killers, "probably teenagers, entered the school shooting with their heads covered by a hood".
Even though Brazil is one of the most violent countries in the world, it is rare to see school shootings in the South American country.
Far right President Jair Bolsonaro passed a law allowing people to carry arms soon after assuming power in January, delivering on a campaign promise. 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.
"Then a lot of kids started running out, all screaming", he said.
Two Sussex MPs switch to back Theresa May’s second Brexit deal
Mr Zeichner slammed the government for "recklessly wasting yet more time in order to force a false binary choice" over Brexit. Conservative MP John Baron then pushed Mrs May to back a no-deal Brexit, arguing "no deal is better than a bad deal".
Aged between 20 and 25 years old, the alleged attackers are not believed by police to be former students of the school that has some 1,000 primary and secondary students.
While gun laws are considered strict in Brazil, it is not hard to illegally purchase a weapon.
At least 17 other people, mostly children, were also shot and taken to hospitals, in which several are in serious condition.
He added that the school had been evacuated and police were inspecting possible explosives left by the shooters.
Rescue efforts underway after Lagos school collapse
Lagos state's deputy governor, Idiat Adebule, told the Vanguard newspaper that it was too early to give a death toll. Building materials are often sub-standard and the enforcement of regulations in Nigeria is weak.
"I was shocked with the scenes I saw inside that school", Doria said. "It is the saddest thing I have seen in my life".