Thousands of supporters of the right-wing former Brazilian president, Jair Bolsonaro, stormed the parliament and the Supreme Court, and surrounded the presidential palace.
But police regained control of government buildings in the capital, Brasilia, on Sunday evening, following hours of clashes.
The new president, Luiz Inacio Lula da Silva, vowed to find and punish the perpetrators.
Justice Minister Flavio Dino told local media that regarding 200 people had already been arrested.
The dramatic scenes – in which thousands of protesters, dressed in soccer jerseys and carrying Brazilian flags, overwhelmed the police and invaded the heart of the country – came just a week following Lula’s inauguration.
The veteran leftist leader was forced to declare emergency powers before sending the National Guard to the capital to restore order.
The president also ordered the closure of the center of the capital – including the main street where government buildings are located – for 24 hours.
Dino said that the authorities confiscated regarding 40 buses used to transport demonstrators to the capital, and described the storming as a “ridiculous attempt to impose the will of (protesters) by force.”
Bolsonaro has repeatedly refused to accept losing the elections that took place in October, and left the country last week instead of participating in the inauguration ceremony, during which he was supposed to hand over the presidential sash.
Bolsonaro, 67, who is believed to be in Florida, condemned the attack and denied any responsibility for encouraging the rioters, in a tweet regarding six hours following the violence erupted.
Da Silva – better known as Lula – said there was “no precedent in the history of our country” for the scenes that took place in Brasilia on Sunday, describing the violence as “the work of vandals and fascists”.
He also criticized the security forces for failing to prevent the demonstrators from reaching the parliament building, accusing them of “incompetence, bad faith or malice”.
“You will see in the pictures that they (police officers) direct people on their way to Praça dos Tres Powers. We will find out who are the financiers of these vandals who went to Brasilia, and they will all pay (the price) by force of law,” he said.
A video clip, broadcast by the “O Globo” news platform, showed some officers laughing and taking pictures together, while the demonstrators who occupied the parliament grounds appeared in the background.
Protesters smashed windows, while others reached the Senate chamber, jumping on benches.
Footage on social media shows protesters pulling a policeman off his horse and attacking him outside the parliament building.
Footage broadcast by state media showed police detaining dozens of demonstrators in yellow shirts outside the presidential palace.
Other suspects – their hands tied behind their backs – were seen being led out of the building.
The demonstrators had gathered since the morning in the lawns in front of Parliament and a kilometer from the Esplanada Street, which is lined with the headquarters of ministries and national monuments.
And the security measures seemed tight, as roads were closed around the parliament area, and armed policemen stood at all entrances to the area.
Many likened what happened to the storming of the US Capitol, which houses Congress, on January 6, 2021, by supporters of former President Donald Trump, Bolsonaro’s ally.
Bolsonaro’s supporters are calling for the army to intervene and for Lula, who defeated his far-right rival in the election, to resign.
Many of them have set up camps in cities across Brazil, some outside military barracks. This is because his most ardent supporters want the army to intervene and hold new elections, saying the elections were stolen from them.
Lula’s enthronement seemed to curb their movements, for the camps in Brasília were dismantled and there were no disturbances on the day he was sworn in.
But Sunday’s scenes show those predictions were premature.
The storming of parliament drew condemnations from around the world.
US President Joe Biden criticized what he called an assault on democracy and the peaceful transfer of power in Brazil.
Biden, in a tweet on Twitter, pledged Washington’s full support for Brazilian democratic institutions.
Lula has also received support from across Latin America, including Argentina, Mexico and Chile.
The European Union and French President Emmanuel Macron showed support for the Brazilian president.