A Brazilian Supreme Court justice called Tuesday for an investigation into a demonstration outside army headquarters attended by President Jair Bolsonaro, where protesters called for military intervention while rallying against stay-at-home orders.

The crowd of around 600 gathered in the capital Brasilia on Sunday, calling on the army to intervene in the handling of the coronavirus pandemic and demanding the closure of Congress.

Some held up posters declaring "Military intervention with Bolsonaro."

The president told the crowd from the back of a pick-up truck, his speech interspersed with fits of coughing: "I am here because I believe in you and you are here because you believe in Brazil."

Calling the affair "very serious," Justice Alexandre de Moraes said that "the democratic state of Brazilian law and its republican institutions" had been violated, in a note released by the court.

Bolsonaro, a former army captain, has been criticized for previously praising Brazil's brutal military dictatorship, in place from 1964-1985.

Politicians and authorities were swift to react to Sunday's demonstration, calling into question Bolsonaro's speech, which made no comment on the crowd's insistence on military intervention nor the demand to close Congress.

The anti-democratic slogans "are unconstitutional and are not to be confused with freedom of expression," de Moraes said.

The protests and the protesters' behavior had "the clear purpose of controlling or even destroying the strength of critical thinking" essential to democracy," he added.

The justice said the investigation, which will not be public, is needed to verify whether any organizations or means of financing anti-democratic acts are in place.

Bolsonaro has frequently criticized partial quarantine measures adopted by governors, including those in charge of the country's most populous states, Sao Paulo and Rio de Janeiro, to halt the spread of the coronavirus.

The pandemic has already claimed more than 2,500 lives in Brazil, where more than 40,500 cases have been reported.