Jair Bolsonaro isn’t big on democracy. The newly elected president has dismissed the notion of human rights as a “disservice” to Brazil. He has bemoaned the fact that its police force, one of the deadliest in the world, does not have the right to kill more freely, promising to give it “carte blanche” under his administration. He once proposed using a helicopter to drop pamphlets warning drug dealers to leave poor communities, or be fired upon indiscriminately.

Bolsonaro is by far the most prominent elected official to praise the harsh military dictatorship that ruled the country from 1964 to 1985. A retired army captain who served in the military from 1977 to 1988, he was a lackluster soldier whose outsize political ambitions often rubbed senior military figures the wrong way. In 1986, for example, he complained to the press about the lack of pay raises and the dearth of professional prospects for soldiers on active duty. Soon after, he was court-martialed for stoking unrest. (He was accused of plotting to bomb a military barracks and was convicted, but won on appeal, and the charges against him were eventually dropped.) At the time, the military had only recently returned the government to civilian control. But Bolsonaro, unlike many leading figures in the military, never accepted its diminished role in Brazilian life. In his presidential campaign, he selected a general as his vice president and promised to name other military men to key posts in government. He wants to militarize Brazil’s borders and has described the Landless Workers Movement, an organization that occupies large, unproductive estates in the countryside to advocate for land reform and denounce rural inequality, as a terrorist organization. He has pledged, in short, to revive, in spirit if not necessarily by law, the repressive thrust of the military regime.

Bolsonaro’s alignment with the armed forces follows a clear political logic. The military is the most trusted public institution in Brazil, polling much higher than Congress, which Brazilians see as hopelessly corrupt, or the judiciary, which is viewed as an insular cabal more interested in preserving its own privileges than in administering justice. (Brazilian judges are among the highest paid in the world.)

In recent years, other leaders in Latin America have profited from a right-wing wave. Mauricio Macri, a conservative multimillionaire, became president of Argentina in 2015; and in 2017, Chileans elected Sebastian Piñera, who has brought into his cabinet officials tied to the brutal regime of Augusto Pinochet. But Bolsonaro stands apart for having accomplished something no politician has attempted since democracy was restored across the region almost 30 years ago: He has won a national election as an unabashed champion of military dictatorship.

Bolsonaro served in the army at a time when its more moderate officials were negotiating a return to civilian government. There were still, however, hardliners who believed handing power back to the same corrupt political class the military had largely uprooted in 1964 was a mistake. They wanted, in other words, to continue hunting down leftists. Bolsonaro almost certainly belonged to this group. During his three decades in Congress, he often lamented that the regime was not more deadly, arguing that killing 30,000 political enemies during the dictatorship would have been better than the several hundred who actually died. (“The dictatorship erred by torturing and not killing,” is a common line.) It makes sense that such militaristic rhetoric would have endeared Bolsonaro to the armed forces, but it’s not clear why the rest of Brazil was taken in by it. Only a tiny minority has called for a military intervention like the one that ushered in dictatorship in 1964. What explains his victory?