The authoritarian leaders taking power around the world share a vocabulary of intolerance, insult, and menace. Jair Bolsonaro, who was elected President of Brazil on promises to end crime, right the economy, and “make Brazil great,” has spent his career gleefully offending women, black people, environmentalists, and gays. “I would be incapable of loving a homosexual son,” he has said. “I would prefer that my son die in an accident than show up with some guy with a mustache.” As a national legislator, he declared one political rival, Maria do Rosário, “not worth raping.” Immigrants are “scum.” The United Nations is “a bunch of communists.” He supports the torture of drug dealers, the use of firing squads, and the empowerment of a hyper-aggressive police force. “A policeman who doesn’t kill,” he has said, “isn’t a policeman.”

On New Year’s Day, Bolsonaro was inaugurated in the capital city of Brasília. Standing in the back of a Rolls-Royce Silver Wraith convertible, he waved at crowds of supporters, and they shouted back, “The captain has arrived!” “The legend!” Bodyguards trotted alongside the car, flanked by uniformed cavalrymen on elegant white horses. Bolsonaro is sixty-four, tall and slim, with sharply parted dark hair and heroically bushy eyebrows. His third wife, Michelle, stood next to him, waving at the masses.

After the inaugural ceremony, Bolsonaro gave a speech outside Planalto, the Presidential palace; huge video screens magnified his image for tens of thousands of supporters. Many wore Brazilian flags draped over their shoulders and T-shirts featuring the outline of Bolsonaro’s face, in the style of the movie poster for “The Godfather.” At the ceremony, Bolsonaro had spoken broadly of the need to “unite the people.” Now, addressing his most fervent supporters, he could relax. He said that he had come to free them from the scourge of socialism—an allusion to his left-leaning predecessors Luiz Inácio Lula da Silva and Dilma Rousseff, who had governed from 2003 to 2016. “Our flag will never be red,” he said. “It will be red only if we need to bleed over it.” The crowd took up a chant: “Never red!”

A former Army captain, Bolsonaro served seven undistinguished terms in the Chamber of Deputies, Brazil’s highest legislative body, representing four different political parties. Over twenty-seven years, he delivered some fifteen hundred speeches and introduced more than a hundred and fifty bills, but only two passed—one exempting computer equipment from taxation and another approving a controversial cancer drug. Mostly, he spoke on behalf of the armed forces, even calling for a restoration of the repressive military dictatorship that governed Brazil from 1964 to 1985. In one interview, he discounted the idea that democracy could bring order and prosperity: “You’ll only change things by having a civil war and doing the work the military regime didn’t do. . . . If a few innocent people die, that’s all right.”

Like many autocrats, Bolsonaro came to power with a suddenness that alarmed the élites. He had run a low-budget campaign, consisting mostly of a social-media effort overseen by his son Carlos. At events with supporters, he posed for selfies making a gesture as if he were shooting a machine gun. He promised to “reconstruct the country”—and to return power to a political right that had been in eclipse for decades. In the inaugural ceremony, he vowed to “rescue the family, respect religions and our Judeo-Christian tradition, combat gender ideology, conserving our values.”

Afterward, Bolsonaro received a procession of foreign dignitaries, and as they stepped up to pay their respects the crowd greeted them with cheers or boos. The Hungarian autocrat Viktor Orbán got perfunctory applause; the bolsonaristas seemed not to know who he was. The Israeli Prime Minister, Benjamin Netanyahu, who is fending off charges of fraud and bribery, got a riotous cheer. Bolivia’s President, Evo Morales, the only left-wing leader to attend, was subjected to shouts of “Get out, communist,” and “índio de merda”—“fucking Indian.”

Despite Bolsonaro’s divisive rhetoric, American conservatives were enthusiastic about his Presidency. He had expressed leeriness of China and hostility toward socialists in Cuba and Venezuela; he promised to move Brazil’s Embassy in Israel from Tel Aviv to Jerusalem. Donald Trump didn’t attend the inauguration, but he tweeted his solidarity: “The USA is with you!” Bolsonaro, who sees in Trump a kindred spirit and an opportunity, tweeted back, “Together, under God’s protection, we shall bring prosperity and progress to our people!”

Brasília, built in the late nineteen-fifties, is a city of immense spaces, with sweeping lawns and public buildings in curvilinear shapes—a “Jetsons”-era vision of optimism for the future. As the seat of government, it is home to tens of thousands of middle-class bureaucrats and their families. It is also a place where destitute people camp out in improvised shelters alongside highways and use grand fountains to wash their laundry. The country’s population, two hundred and nine million people, is bitterly polarized. Violent crime is endemic. In 2017, nearly sixty-four thousand Brazilians were murdered, an average of about a hundred and seventy-five every day. The economy, after several years of devastating recession, is virtually stagnant. Twenty-five per cent of the population lives below the poverty line of five dollars and fifty cents a day.

A decade ago, Brazil was prospering, amid a boom in oil and other commodities. Luiz Inácio Lula da Silva, the President at the time, was a charismatic leftist; the son of farmworkers, he had gone from shoeshine boy to steelworker and union leader before taking office, in 2003. Lula was popular, and his Workers’ Party (known by its Portuguese initials, P.T.) instituted generous domestic programs. His administration did little to diminish Brazil’s tradition of corruption, and not enough to reduce crime or develop industry, but, as long as commodities prices stayed high, the economy thrived. In 2005, his government finished paying off a fifteen-billion-dollar loan to the International Monetary Fund, a year ahead of schedule.

In 2010, Lula stepped aside, having reached the legal limit of two consecutive terms, and his protégée Dilma Rousseff—a leftist guerrilla in her youth—became Brazil’s first female President. But commodities prices were slipping, and in her second term a corruption scandal exploded around the state-run oil company, Petrobras. Brazilians came to the streets to protest, and Rousseff’s political rivals sensed an opportunity. In 2016, they began hearings to impeach her, on charges of improperly using loans from state banks to obscure a budget deficit. Rousseff’s supporters complained of hypocrisy, noting that many members of the Brazilian legislature had been indicted for crimes ranging from bribery and money laundering to kidnapping and slavery. (The legislator who led the impeachment effort, Eduardo Cunha, was subsequently convicted of taking forty million dollars in bribes.) But the bid to remove Rousseff worked. It also helped draw attention to Bolsonaro. During the proceedings, he dedicated his vote to Carlos Brillhante Ustra, who had commanded the military unit that captured and tortured Rousseff when she was a young guerrilla.

For Brazilians watching the news in recent years, the country can appear to be perilously in decline. An enormous scandal—called Operação Lava Jato, or “Operation Car Wash”—seems to involve every third official in the government. Two dams have collapsed at mine sites in the countryside, releasing millions of gallons of waste. Last September, an accidental fire broke out at the two-hundred-year-old National Museum, destroying an irreplaceable ethnographic collection. “The country is overwhelmed by a terrible feeling that we have failed as a nation,” Gunter Axt, a Brazilian historian, told me. “And perhaps it is true.”