Brazil was ruled by the military from 1964 to 1985 and some Brazilians support the idea of a new takeover
Dozens of rightwing protesters burst into Brazil's legislative chamber to demand a military coup.
The approximately 40 people swept past security guards and broke a glass door to get into the chamber of the lower house of Congress, interrupting the start of the session.
Taking over the podium they chanted "general here, general here," in reference to support for a takeover by the army.
Brazil was ruled by a military government from 1964 to 1985 and a small minority of Brazilians support the idea of a new takeover in response to widespread corruption and a floundering economy.
The chamber was mostly empty at the time, but the scenes of shouting protesters were played on national television. All the demonstrators were detained by police for questioning.
"It's worrying and serves as a warning. We are returning to an era of extremes," said one congressional deputy, Betinho Gomes.
Later in the day, President Michel Temer's spokesman, Alexandre Parola, called the protest an "affront" and said it was a "violation of the norms of democratic coexistence."
"Episodes like today's are unacceptable and will be fought in the light of law and in defense of the integrity of each of the state's institutions," he said.
Brazil endured a turbulent day Wednesday as Rio de Janeiro riot police fired tear gas, rubber bullets and stun grenades into an angry crowd protesting proposed austerity measures for the state of Rio.
More than 2,000 people, ranging from teachers to off-duty police officers, faced off against elite Shock Battalion police outside the state legislature in the center of Rio.
Rio state Governor Luiz Fernando Pezao, a member of Temer's conservative party, is pushing budget cuts in response to nearly empty public coffers.
The state has been in crisis all year and required a huge federal bailout just before hosting the Olympic Games in August.