Last month, during a lecture at the Grande Oriente Masonic Lodge, in Brasília, a Brazilian Army general named Antonio Hamilton Martins Mourão said that the country’s military leaders had discussed overthrowing the government. Corruption investigations have ensnared successive Presidential administrations in Brazil, and Mourão said there was a limit to the political chaos the armed forces could tolerate. “Either the institutions solve the political problem through the courts, removing those elements involved in illegal acts from public life, or we will have to impose the solution,” he said. Wearing his official uniform, his chest laden with decorations, Mourão explained that his colleagues in the Army’s high command shared his view. “We have very well-made plans,” he went on, before ominously adding, “This solution won’t be easy. It will bring trouble, you can be sure of that.” When he finished, the audience broke into applause.

Brazil is all too familiar with military coups—the last one, in 1964, brought on a twenty-one-year dictatorship. Mourão’s speech, then, was troubling enough on its own. But his superiors’ reactions were even more disturbing. No one in the civilian Administration publicly condemned his remarks, and the commander of the Army, General Eduardo Villas Bôas, refused to censure his subordinate for violating the prohibition on political speech by active officers. Instead, he called Mourão “a great soldier.” Confronted by a journalist on TV, he was compelled to weakly acknowledge that “dictatorship is never the best” solution, but he only doubled down on Mourão’s dark suggestion, saying that the armed forces had the constitutional authority to “intervene” when the country finds itself “in the imminence of chaos.” As the columnist Josias de Souza noted, Brazil’s constitution grants the military no such power. That did not stop another general, Luiz Eduardo Rocha Paiva, from making the same claim in a newspaper op-ed two weeks later.

The generals are right about one thing: Brazil is in turmoil, economic and political. The country is just barely emerging from the deepest recession in its history, and President Michel Temer has been formally accused of leading a conspiracy to siphon off more than a hundred and eighty million dollars from government contracts. His predecessor, Dilma Rousseff, was impeached last year for violating budget rules. Dozens of lawmakers are facing their own corruption charges, and their cases have created a backlog at the Supreme Court—the only court that can try them. In the meantime, these lawmakers—politicians of various ideological stripes—have united to undermine the power of the judiciary. The phrase “the institutions are working,” stubbornly repeated by high officials, has become so hard to believe that on social media it now serves as an ironic refrain to highlight fresh disorder. Many Brazilians have lost faith in democracy altogether. In a poll taken after the comments by Mourão and Villas Bôas, forty-three per cent of the population said it supported a “temporary military intervention.”

The 1964 coup was also supposed to be temporary. Brazilian generals—backed by the U.S. government—framed it as a necessary evil to preserve democracy from a Communist takeover. Before long, Presidential elections were cancelled, street marches were banned, and Congress periodically shut down. Thousands of suspected subversives were tortured, and more than four hundred were killed. Today, however, with the country registering sixty thousand homicides a year, plenty of Brazilians are nostalgic for those days of law and apparent order. Many believe that the generals cleansed the nation of graft. In reality, as a government truth commission showed in 2014, this perception only reflected the regime’s censorship of the press and control of the judiciary. Under the dictatorship, kickbacks lubricated Brazil’s political system just as they always had.

Still, the myth survives, with dangerous implications. Its current embodiment is a soldier-turned-congressman, Jair Bolsonaro, who has been polling in second place for the 2018 Presidential election. When I spoke to him last year, he told me, “The military period was a time of glory for Brazil, when criminals were criminals, he who worked was recognized for it, and even in soccer we didn’t go through the embarrassment we do today, if you look at Germany’s 7–1”—a winking reference to Brazil’s epic semifinal loss at the 2014 World Cup. Bolsonaro once told a female lawmaker, “I won’t rape you because you don’t deserve it.” He has called the Afro-Brazilian communities known as quilombos “worthless even for procreating.” Of the organizers of an L.G.B.T.Q. art show, he said, “Tem que fuzilar os autores dessa exposição”—they should be lined up and shot. His solution to Brazil’s crime problem is to “give police free rein to kill.” He has cited Donald Trump as a political role model.

In a Facebook video titled “A hug for General Mourão,” recorded after Mourão talked about overthrowing the government, Bolsonaro can be seen telling a fervent crowd in the city of Belém that the general is a patriot trying to keep his country from going under. The post has racked up half a million views. A slim majority of Brazilians still oppose an “intervention,” but surveys also rank the armed forces as the country’s most-trusted institution. Maurício Santoro, a political scientist at the State University of Rio de Janeiro, told me that the generals’ remarks may help Bolsonaro by recreating the regime-era image of honest soldiers crusading against corruption. And the threat of a coup should not be taken lightly. “It’s still an outside possibility,” Santoro told me. “But for the first time since the return of democracy, it’s on the table.”