Thousands of supporters of Brazil's President Jair Bolsonaro gathered early on Wednesday to join the far-right leader at rallies mixing Independence Day military displays with political demonstrations less than a month before a heated election.

Local authorities in the capital Brasilia redoubled security on the central mall to keep Bolsonaro supporters from advancing toward the Supreme Court, as they attempted to do a year ago in a march inspired by the Jan. 6, 2021 assault on the U.S. Capitol.

On Tuesday night, Bolsonaro told security officials to let tractor-trailer trucks driven by his supporters enter the grassy esplanade where hundreds of thousands are expected to attend his rally in the early afternoon.

However, federal district Governor Ibaneis Rocha, an ally of the president, countered Bolsonaro's instructions and maintained a ban on unauthorized vehicles entering the central area.

Bolsonaro appeared briefly on foot alongside supporters at the mall before presiding over the military parade to celebrate 200 years of Brazil's independence from Portugal, including a 21-gun salute and flyovers by air force planes.

Opponents have criticized Bolsonaro for co-opting the national holiday and military parade to serve his re-election campaign, in which opinion polls show him trailing leftist rival Luiz Inacio Lula da Silva ahead of an Oct. 2 vote.

Supporters at the Wednesday morning parade briefly drowned out a military chorale by chanting "Our flag will never be red!" - a jab at the colors of Lula's Workers' Party.

Political rallies scheduled in Brasilia, Sao Paulo and Rio de Janeiro are expected to gauge core support for Bolsonaro and his attacks on Brazil's democratic institutions, possibly signaling how far he could go in challenging electoral results.

Bolsonaro's criticism of Brazil's voting system - and the courts that oversee it - have stirred calls for a military coup from his radical backers. Some fear he is laying the groundwork to claim electoral fraud like his U.S. ally, former President Donald Trump, and reject a potential Lula victory at the polls next month.

The rallies could fire up Bolsonaro's supporters, but he faces the risk of boosting high rejection numbers if his rhetoric runs hot, as it did on Independence Day last year.

At that time, he insulted Supreme Court Justice Alexandre Moraes and threatened to disobey his rulings - comments he soon walked back under intense political pressure.

Opinion polls show Lula, who served as president from 2003 to 2010, leading the election race, but his advantage has narrowed in recent months. The latest surveys still show Lula defeating Bolsonaro by double digits in a likely run-off vote at the end of October.