Police were out in force in Brazil’s capital Brasilia on Tuesday, after supporters of far-right President Jair Bolsonaro answered his calls to rally.
Extra officers were deployed to guard the Supreme Court, following warnings that Mr Bolsonaro’s supporters might try to storm the building.
It comes after the president accused the Supreme Court and Congress of blocking his reforms.
Critics say he wants to put on a show of strength amid plummeting ratings.
One recent opinion poll gave former President Luiz Inácio Lula da Silva a nine-percentage point lead over Mr Bolsonaro in the first round of voting.
While elections are not due to be held until October 2022, Mr Bolsonaro’s approval ratings have also dropped to an all-time low.
A poll by the Atlas Institute suggested that 61% of Brazilians described his government’s performance as bad or very bad, up from 23% when he first took office in January 2019.
Mr Bolsonaro has responded by lashing out at the Supreme Court justices. He tried to have one of them impeached after the justice launched two investigations against him.
He has also tried to blame the Supreme Court for his government’s slow response to the Covid pandemic, falsely alleging that the court prevented him from taking quick action to curb the spread of the virus.
Tens of thousands of Mr Bolsonaro’s supporters responded to his call to rally in Brasilia on the country’s independence day on Tuesday.
In the early hours, some broke through a police cordon protecting the Supreme Court but they failed to surround the building as they had apparently planned.
Threats made by some of the president’s supporters to storm the Supreme Court have led to fears that Brazil could see similar scenes to those that played out on 6 January in Washington DC, when supporters of President Donald Trump surged past barricades into the US Capitol.
As recently as Friday, President Bolsonaro called on his backers to turn out on independence day to give the Supreme Court justices an “ultimatum” and to stop them from “meddling”.
“Our country can’t continue to be held hostage by one or two people,” he said on Tuesday in reference to two of the justices.
Mr Bolsonaro is expected to fly from Brasilia to São Paulo later on Tuesday to join a rally of his supporters there.
Smaller events have also been planned in many other cities.
Critics of the president have gathered for counter-rallies and there are fears the two sides could clash.
Some groups opposed to Mr Bolsonaro have urged people to attend protests on Sunday instead to avoid confrontations with the president’s supporters.