Supporters of former Brazilian President Jair Bolsonaro who refuse to accept his election defeat stormed the presidential palace after the inauguration of his leftist rival on Sunday.
Thousands of demonstrators bypassed security barricades, climbed on roofs, smashed windows and invaded the National Congress, the Palácio do Planalto (Presidential Palace), and the Supreme Court - which were believed to be largely vacant over the weekend.
Footage from the scene showed protesters draped in Brazil's flag ransacking new President Luiz Inacio Lula da Silva's personal office and hauling out personal items, including his sofa.
Some of the demonstrators called for a military intervention to either restore the far-right Bolsonaro to power or oust Lula from the presidency.
Hours went by before control of the buildings on Brasilia's vast Three Powers Square was reestablished, with hundreds of the participants arrested.
In a news conference from Sao Paulo state, Lula accused Bolsonaro of encouraging the uprising by those he termed "fascist fanatics" and read a freshly signed decree for the federal government to take control of security in the federal district.
"There is no precedent for what they did and these people need to be punished," Lula said.
TV channel Globo News showed protesters wearing the green and yellow colors of the national flag that also have come to symbolize the nation's conservative movement and were adopted by Bolsonaro's supporters.
The former president has repeatedly sparred with Supreme Court justices, and the room where they convene was trashed by the rioters. They sprayed fire hoses inside the Congress building and ransacked offices at the presidential palace. Windows were broken in all of the buildings.
Bolsonaro, who flew to Florida ahead of Lula's inauguration, repudiated the president's accusation late Sunday. He wrote on Twitter that peaceful protest is part of democracy but vandalism and invasion of public buildings are "exceptions to the rule."
Police fired tear gas in their efforts to recover the buildings, and were shown on television in the late afternoon marching protesters down a ramp from the presidential palace with their hands secured behind their backs.
By early evening, with authorities' control of the buildings restored, Justice Minister Flavio Dino said in a news conference that roughly 200 people had been arrested and officers were firing more tear gas to drive away lingering protesters.
But with the damage already done, many in Brazil were questioning how the police had ignored abundant warnings, and asked if they were unprepared or somehow complicit.
Lula said at his news conference there was "incompetence or bad faith" on the part of police, and that they had been likewise complacent when Bolsonaro supporters rioted in the capital weeks ago. He promised those officers would be punished and expelled from the corps.
The incident recalled the Jan. 6, 2021, assault on the U.S. Capitol by supporters of then-President Donald Trump.
Political analysts have warned for months that a similar storming was a possibility in Brazil, given that Bolsonaro has sown doubt about the reliability of the nation's electronic voting system - without any evidence.
The results were recognized as legitimate by politicians from across the spectrum, including some Bolsonaro allies, as well as dozens of foreign governments.
Unlike the 2021 attack in the U.S., few officials were likely to have been working in the Brazilian Congress and Supreme Court on a Sunday.
U.S. President Joe Biden told reporters that the riots in Brazil were "outrageous." His national security adviser Jake Sullivan went a step further on Twitter and said the U.S. "condemns any effort to undermine democracy in Brazil."
Biden later tweeted that he looked forward to continuing to work with Lula, calling the riots an "assault on democracy and on the peaceful transfer of power in Brazil."
British Foreign Secretary James Cleverly tweeted: "The violent attempts to undermine democracy in Brazil are unjustifiable. President @LulaOficial and the government of Brazil have the full support of the UK."
U.N. Secretary-General Antonio Guterres also said on Twitter that he condemned the assault on Brazil's democratic institutions but he was confident "the will of the Brazilian people and the country's institutions" would be respected.
Earlier videos on social media showed a limited presence of the capital's military police; one showed officers standing by as people flooded into Congress, with one using his phone to record images.
The capital's security secretariat didn't respond to a request from The Associated Press for comment about the relative absence of the police.
"Brazilian authorities had two years to learn the lessons from the Capitol invasion and to prepare themselves for something similar in Brazil," said Mauricio Santoro, political science professor at the State University of Rio de Janeiro.
"Local security forces in Brasilia failed in a systematic way to prevent and to respond to extremist actions in the city. And the new federal authorities, such as the ministers of justice and of defense, were not able to act in a decisive way."
Federal District Gov. Ibaneis Rocha confirmed on Twitter he had fired the capital city's head of public security, Anderson Torres. Local media reported that Torres is currently in the U.S.
The office of Lula's attorney general asked the Supreme Court to order Torres' imprisonment.
Bolsonaro supporters have been protesting Lula's electoral win since October 30, blocking roads, setting vehicles on fire and gathering outside military buildings, urging the armed forces to intervene.
The head of Brazil's electoral authority rejected the request from Bolsonaro and his political party to nullify ballots cast on most electronic voting machines.
"Two years since Jan. 6, Trump's legacy continues to poison our hemisphere," U.S. Sen. Bob Menendez, who chairs the Senate's foreign relations committee, tweeted, adding that he blamed Bolsonaro for inciting the acts. "Protecting democracy & holding malign actors to account is essential."