Brazil's Supreme Court removed the governor of Brasilia from office for 90 days over security failings that it said allowed thousands of backers of far-right former President Jair Bolsonaro to ransack government buildings in the capital.
Tens of thousands of anti-democratic demonstrators on Sunday invaded the Supreme Court, Congress and presidential palace in the worst attack on Brazil's institutions since democracy was restored four decades ago, drawing global condemnation.
President Luiz Inacio Lula da Silva, who took office on January 1 after a narrow October election win, promised to bring those responsible to justice, after demonstrators broke windows and furniture, destroyed art work and stole the original 1988 Constitution. Guns were seized from a presidential security office.
As well as removing the Brasilia governor for 90 days late on Sunday, Supreme Court Justice Alexandre de Moraes ordered social media platforms Facebook, Twitter and TikTok to block accounts of users spreading anti-democratic propaganda.
Lula, a leftist president, said the local militarised police force that reports to Brasilia Governor Ibaneis Rocha, a former Bolsonaro ally, did nothing to stop the protesters advancing.
Lula decreed federal intervention of public security in the capital and promised exemplary punishment for the leaders of the "fascist" assault that was aimed at provoking a military coup that could restore Bolsonaro to power.
"All the people who did this will be found and punished," Lula told reporters from Sao Paulo State.
Lula blamed Bolsonaro for inflaming his supporters after a campaign of baseless allegations about election fraud after the end of his rule marked by divisive nationalist populism.
From Florida, where Bolsonaro flew 48 hours before his term ended, the former president rejected the accusation. He said on Twitter that peaceful demonstrations were democratic but the invasion of government buildings "crossed the line".
The assault raised questions among Lula's allies about how security forces in the capital were so unprepared and easily overwhelmed by rioters who had discussed plans on social media for days about gathering for weekend demonstrations.
The invasion, which recalled the assault on the U.S. Capitol two years ago by backers of former President Donald Trump, was condemned by world leaders, from US President Joe Biden to European leaders and Latin American heads of state.
"The violent attacks on democratic institutions are an attack on democracy that cannot be tolerated," German Chancellor Olaf Scholz said on Monday. British Prime Minister Rishi Sunak condemned any bid to undermine the peaceful transfer of power.
Kremlin spokesman Dmitry Peskov said Russia condemned "in the strongest terms" the actions of those who instigated the disorder.
Brazilian markets are expected to take a knock when they open on Monday.
Police retook the damaged public buildings in the futuristic capital after three hours and dispersed the crowd with tear gas.
Justice Minister Flavio Dino said 200 demonstrators had been arrested. Governor Rocha, writing on Twitter before the court announced its move, put the number at 400.
Dino said investigations would aim to uncover who financed the several hundred buses that brought Bolsonaro's supporters to Brasilia and also probe Rocha for not preparing security.
The occupation of the government buildings had been planned for at least two weeks by Bolsonaro's supporters in groups on social media messaging platforms such as Telegram and Twitter, yet there was no move by security forces to prevent the attack, called by one group "the seizure of power by the people."
Messages seen by Reuters throughout the week showed members of such groups organizing meeting points in several cities around the country, from where chartered buses would leave for Brasilia, with the intention to occupy public buildings.
The plan included camping in front of the army command's headquarters, where demonstrators had camped out since Lula narrowly won the election in October.
In the early afternoon of Sunday, when the protesters began to arrive on Brasilia's esplanade, instead of being contained, they were escorted by Military Police cars with flashing lights.
Riot police only arrived on the scene two hours after the invasions began.
Bolsonaro faces legal risks from several investigations before the Supreme Court in Brazil and his future in the United States, where he travelled on a visa issued only to sitting presidents, is in question.
"Bolsonaro should not be in Florida," Democratic Congressman Joaquin Castro said on CNN. "The United States should not be a refuge for this authoritarian who has inspired domestic terrorism in Brazil. He should be sent back to Brazil."