Brazil's president Jair Bolsonaro has sparked outrage after attending a protest against coronavirus lockdown measures, which also called for the military to take power.

The far-right leader, who has long praised the country's 1964-1985 dictatorship, infringed his own government's recommendation to maintain social distancing when he spoke at the small demonstration in Brasilia on Sunday.

The protest outside the capital's army headquarters – held on the day Brazil celebrates its military – was calling for the Supreme Court and Congress to be shut down over the stay-at-home orders intended to slow the spread of coronavirus.

“I am here because I believe in you. You are here because you believe in Brazil,” a coughing Mr Bolsonaro told the tightly packed demonstrators, many of whom were not wearing masks.

He later posted on Twitter footage of him addressing the crowd.

Loading....

Mr Bolsonaro himself has been a fierce critic of state governors' lockdown measures. On Friday he fired his health minister, who had been promoting social distancing to contain the outbreak.

Since being sworn in early last year, Mr Bolsonaro has asked the defence ministry to organise commemorations of the two decades-long military dictatorship, paid tribute to General Alfredo Stroessner, the military strongman in neighbouring Paraguay, and backed changes in schools' history curriculum that would revise the way children are taught about the 1964 military coup.

But for many Mr Bolsonaro, a former army captain, crossed a line on Sunday.

“The president of the republic crossed the Rubicon,” tweeted Felipe Santa Cruz, president of the Brazilian Bar Association. “Time for Democrats to unite, to overcome difficulties and disagreements, in the name of a greater good called FREEDOM!”

Supreme Court justice Luis Roberto Barroso focused his criticism on protesters.

“It is frightening to see demonstrations for the return of the military regime, after 30 years of democracy,” he wrote on Twitter.

Glenn Greenwald, a journalist and prominent Brazil-based critic of Mr Bolsonaro, tweeted: "It's surreal to live in a country that is a 35-year-old democracy and watch people go out onto the streets in a middle of pandemic to demand their democratic rights be taken away and a military dictatorship re-imposed."

Mr Bolsonaro has multiplied public appearances in recent weeks, meeting with supporters, protesters, passersby or business owners.