There were no immediate reports of deaths or injuries from their rampage, but the invaders left a trail of destruction, throwing furniture through the smashed windows of the presidential palace, flooding parts of Congress with a sprinkler system and ransacking ceremonial rooms in the Supreme Court.
The sight of thousands of yellow-and-green clad protesters running riot in the capital capped months of tension following the Oct. 30 presidential vote.
The uprising, which lasted a little over three hours, underlined the severe polarization that still grips the country days after the inauguration of leftist President Luiz Inacio Lula da Silva, who defeated Bolsonaro in the October election.
"These vandals, who we could call ... fanatical fascists, did what has never been done in the history of this country," said Lula in a press conference during an official trip to Sao Paulo state. "All these people who did this will be found and they will be punished."
Lula, who announced a federal security intervention in Brasilia lasting until Jan. 31 after capital security forces were initially overwhelmed by the invaders, blamed Bolsonaro for inflaming his supporters after a campaign of baseless allegations about potential election fraud.
The president's allies also raised questions about how public security forces in the capital Brasilia were so unprepared and easily overwhelmed by rioters who had been planning on social media for days to gather for weekend demonstrations.
Bolsonaro, an acolyte of Trump's who has yet to concede defeat, peddled the false claim that Brazil's electronic voting system was prone to fraud, spawning a violent movement of election deniers.
"This genocidist ... is encouraging this via social media from Miami," Lula said, referring to Bolsonaro, who flew to Florida 48 hours before the end of his term and was absent from Lula's inauguration. "Everybody knows there are various speeches of the ex-president encouraging this."
Bolsonaro, whose presidency was marked by divisive nationalist populism, was silent for nearly six hours about the chaos in Brasilia before posting on Twitter that he "repudiates" Lula's accusations against him.
The former president, who has rarely spoken in public since losing the election, also said peaceful demonstrations are part of democracy but invading and damaging public buildings "crosses the line."
The violence in Brasilia could amplify the legal risks Bolsonaro faces. It also presents a headache for U.S authorities as they debate how to handle his stay in Florida. Prominent Democratic lawmakers said the United States could no longer grant Bolsonaro "refuge" in the country.
The Bolsonaro family lawyer, Frederick Wassef, did not respond to a request for comment.
By 6:30 p.m. local time (2130 GMT) security forces had managed to retake the capital's most iconic three buildings.
Brasilia Governor Ibaneis Rocha, a longtime Bolsonaro ally facing tough questions after Sunday's security lapses, said on Twitter more than 400 people had been arrested and authorities were working to identify more.
The invasions were condemned by leaders around the world.
U.S. President Joe Biden called the events an "assault on democracy and on the peaceful transfer of power," adding that Brazil's democratic institutions had full U.S. support.
Far from the capital, Brazilian industries were on alert for a fresh round of unrest from Bolsonaro supporters, whose post-election highway blockades have disrupted grains shipments and meatpacking operations in recent months.
State-run oil company Petrobras stepped up security at its refineries, in a cautionary measure after attack threats against assets including Brazil's biggest fuel plant.
Petroleo Brasileiro SA (PETR4.SA), as the company is formally known, said in a statement that all its assets and refineries are operating normally.
Analysts warned the unrest could trigger more volatility in Brazil's financial markets, which have swung sharply in recent weeks on doubts about how Lula will reconcile big spending promises with stretched public finances.
The Supreme Court, whose crusading Justice Alexandre de Moraes has been a thorn in the side of Bolsonaro and his supporters, was ransacked by the invaders, according to images from social media which showed protesters clubbing security cameras and shattering the windows of the modernist building.
Both Moraes and the court's Chief Justice Rosa Weber vowed punishment for the "terrorists" who had attacked the country's democratic institutions. The heads of both houses of Congress denounced the attacks publicly and moved up plans to fly back to the capital, according to people familiar with the matter.
Rocha, the Brasilia governor, said he had fired his top security official, Anderson Torres, previously Bolsonaro's justice minister. The solicitor general's office said it had filed a request for the arrest of Torres.
Torres told website UOL he was with his family on holiday in the United States and had not met with Bolsonaro. UOL reported he was in Orlando, where Bolsonaro is now staying.
On Saturday, with rumors of a confrontation brewing in Brasilia, Justice Minister Flávio Dino authorized the deployment of the National Public Security Force. On Sunday, he wrote on Twitter, "this absurd attempt to impose the will by force will not prevail."
In Washington in 2021, Trump supporters attacked police, broke through barricades and stormed the Capitol in a failed effort to prevent congressional certification of Joe Biden's 2020 election victory.
Trump, who has announced a third bid for the presidency, in 2024, had pressured his vice president, Mike Pence, not to certify the vote, and he continues to claim falsely that the 2020 election was stolen from him through widespread fraud.