RIO DE JANEIRO (AP) — Brazilian authorities vowed Monday to protect democracy and punish thousands of supporters of ex-President Jair Bolsonaro who stormed and trashed the nation’s highest seats of power in chaos with striking similarities to the Jan. 6, 2021, insurrection at the U.S. Capitol.

The protesters swarmed into Congress, the Supreme Court and presidential palace on Sunday. Many have said they want the Brazilian army to restore the far-right Bolsonaro to power and oust the newly inaugurated leftist Luiz Inácio Lula da Silva.

Police broke down a pro-Bolsonaro encampment outside a military building Monday and detained some 1,200 people there, the justice ministry’s press office told The Associated Press.

Lula and the heads of the Supreme Court, Senate and Lower House also signed a letter Monday denouncing acts of terrorism and vandalism and saying they were taking legal measures.

Justice Minister Flávio Dino told reporters police have begun tracking those who paid for the buses that transported protesters to the capital. At the news conference late Sunday, Brazil’s minister of institutional relations said the buildings would be inspected for evidence including fingerprints and images to hold people to account, and that the rioters apparently intended to spark similar uprest nationwide.

“They will not succeed in destroying Brazilian democracy. We need to say that fully, with all firmness and conviction,” Dino said. “We will not accept the path of criminality to carry out political fights in Brazil. A criminal is treated like a criminal.”

Rioters donning the green and yellow of the national flag on Sunday broke windows, toppled furniture, hurled computers and printers to the ground. They punctured a massive Emiliano Di Cavalcanti painting at the presidential palace in seven places and completely destroyed other works of art. They overturned the U-shaped table at which Supreme Court justices convene, ripped a door off one justice’s office and vandalized an iconic statue outside the court. The monumental buildings’ interiors were left in states of ruin.

Monday’s arrests came in addition to the 300 held Sunday while caught in the act.

But police were noticeably slow to react – even after the arrival of more than 100 buses – leading many to ponder whether authorities had either simply ignored numerous warnings, underestimated the protesters’ strength, or been somehow complicit.

Public prosecutors in the capital said local security forces had at very least been negligent. A supreme court justice temporarily suspended the regional governor. Another justice blamed authorities for not swiftly cracking down on budding neofascism in Brazil.

After his Oct. 30 electoral defeat, Bolsonaro, who has gone to Florida, has been stoking belief among his hardcore supporters that the electronic voting system was prone to fraud — though he never presented any evidence. His lawmaker son Eduardo Bolsonaro held several meetings with former U.S. President Donald Trump, Trump’s longtime ally Steve Bannon and his senior campaign adviser, Jason Miller.

Results from Brazil’s election — the closest in over three decades — were quickly recognized by politicians across the spectrum, including some Bolsonaro allies, as well as dozens of governments. And Bolsonaro surprised nearly everyone by promptly fading from view. He neither conceded defeat nor emphatically cried fraud, though he and his party submitted a request to nullify millions of votes that was swiftly dismissed.

Brazilians have used electronic voting since 1996 that security experts consider less secure than hand-marked paper ballots because they leave no auditable paper trail. Brazil’s system is, however, closely scrutinized and domestic authorities and international observers have never found evidence of it being exploited to commit fraud.

Still, Bolsonaro’s supporters refused to accept the results. They blocked roads and have remained camped outside military buildings, urging the armed forces to intervene. Dino, the justice minister, referred to the encampments as incubators of terrorism. Protests were overwhelmingly peaceful, but isolated threats — including a bomb found on a fuel truck headed to Brasilia’s airport — prompted security concerns.

Two days before Lula’s Jan. 1 inauguration, Bolsonaro flew to the U.S. and took up temporary residence in Orlando. Many Brazilians expressed relief that, while he declined to participate in the transition of power, his absence allowed it to occur without incident.

Or so it had been, until Sunday’s havoc.

“Bolsonarism mimics the same strategies as Trumpism. Our Jan. 8 — an unprecedented manifestation in Brazilian politics — is clearly copied from Jan. 6 in the Capitol,” said Paulo Calmon, a political science professor at the University of Brasilia. “Today’s sad episodes represent yet another attempt to destabilize democracy and demonstrate that the authoritarian, populist radicalism of Brazil’s extreme right remains active under the command of former President Bolsonaro, the ‘Trump of Latin America.’”

U.S. President Joe Biden, Mexican President Andrés Manuel López Obrador and and Canadian Prime Minister Justin Trudeau jointly said Monday that “Canada, Mexico, and the United States condemn the January 8 attacks on Brazil’s democracy and on the peaceful transfer of power. We stand with Brazil as it safeguards its democratic institutions.”

Analysts told the AP that the upheaval could yield greater political support for Lula and his stated mission to pacify the polarized country, with many right-wing citizens and politicians repulsed by Sunday’s scenes and eager to distance themselves from far-right radicalism. The leader of Bolsonaro’s own party called the uprising “an embarrassment.”

“This may have been the beginning of the end. The political system will want to isolate that radical movement and move away from it,” said Mario Sérgio Lima, political analyst at Medley Advisors. “I think what we will see now is the right trying to create new alternatives and new leaders, and the center distancing itself.”

In a news conference from Sao Paulo state, Lula read a freshly signed decree for the federal government to assume control of security in the federal district. He said that the so-called “fascist fanatics,” as well as those who financed their activities, must be punished, and also accused Bolsonaro of encouraging their uprising.

Bolsonaro repudiated the president’s accusation late Sunday. Writing on Twitter, he said peaceful protest is part of democracy, but vandalism and invasion of public buildings are “exceptions to the rule.”

Unlike the 2021 attack in the U.S., few officials would have been working in the top government buildings on a Sunday. And videos showed limited presence of the capital’s military police.

One video showed a group of protesters easily pushing through a police barricade, with only a few officers using pepper spray. Another showed officers standing by as protesters stormed the Congress, including one using his phone to record what was happening.

“This was a gross error by the federal district’s government. It was a tragedy foretold,” said Thiago de Aragão, director of strategy at Brasilia-based politican consultancy Arko Advice. “Everyone knew they (the protesters) were coming to Brasilia. The expectation was that the federal district’s government was going to mount a response to protect the capital. They didn’t do any of that.”

Lula said at his news conference there was “incompetence or bad faith” on the part of police, and he promised some would be punished.

Federal District Gov. Ibaneis Rocha confirmed on Twitter he had fired the capital city’s head of public security, Anderson Torres — hours before a Supreme Court justice suspended the governor from office, alleging “intentional omission.”

“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.”

___

AP writer Carla Bridi contributed from Salvador.