BRASILIA: Brazil's Supreme Court late on Sunday removed the governor of Brasilia from office for 90 days due to flaws in security in the capital, after thousands of backers of far-right former president Jair Bolsonaro ransacked government buildings.

Supreme Court Justice Alexandre de Moraes also ordered social media platforms Facebook, Twitter and TikTok to block coup-mongering propaganda.

Brazilian authorities have begun investigating the worst attack on the country's institutions since democracy was restored four decades ago, with President Luiz Inacio Lula da Silva vowing to bring those responsible for the riot to justice.

Tens of thousands of anti-democratic demonstrators on Sunday invaded the Supreme Court, Congress and the presidential palace and smashed windows, overturned furniture, destroyed art works and stole the country's original 1988 Constitution. Guns were also seized from a presidential security office. 

Leftist president Lula, who took office on Jan. 1, said the local militarized police force that reports to Brasilia Governor Ibaneis Rocha, a former Bolsonaro ally, did nothing to stop the advance of the protesters.

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.

The assault raised questions among Lula's allies about how public security forces in the capital were so unprepared and easily overwhelmed by rioters who had announced their plans days ahead on social media.

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 he flew 48 hours before his term ended, Bolsonaro rejected the accusation, tweeting that peaceful demonstrations were democratic but the invasion of government buildings "crossed the line."

The invasion, which recalled the assault on the U.S. Capitol two years ago by backers of former President Donald Trump, was quickly condemned by world leaders, from U.S. President Joe Biden and France's Emmanuel Macron to Latin American heads of state.

HUNDREDS ARRESTED

Police retook the damaged public buildings in the iconic futuristic capital after three hours and dispersed the crowd with tear gas.

Justice Minister Flavio Dino said 200 demonstrators had been arrested, but governor Rocha put the number at 400.

Dino said investigations will 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 groups of coup-mongers 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 traveled 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."