Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today’s WorldView newsletter.

On Tuesday, Jair Bolsonaro was sworn in as Brazil’s president. By the following day, he had already taken the first steps in turning his country’s government sharply to the right.

Bolsonaro issued a directive giving the Agriculture Ministry, which is dominated by a powerful agro-business lobby, control over areas reserved for Brazil’s indigenous peoples and the descendants of former slaves. He made it nearly impossible for new protected lands to be demarcated. A government agency run by a prominent general was given the ability to “monitor" international organizations and nongovernmental organizations operating in Brazil. And the LGBT community was excluded from a list of groups whose concerns would be protected by a new human rights ministry.

None of this should be a surprise. Bolsonaro is a strident far-right ideologue, notorious for his bigoted rhetoric against women, minorities, the poor and LGBT Brazilians. Once a buffoonish figure on the fringes of the country’s politics, he marshaled deep frustrations with Brazil’s dysfunction — its stagnating economy, its soaring crime, its corrupt political elites — to score dramatic victories in elections last year. Now he is following through on his promises to upend the status quo and crack down on imagined enemies.

Perhaps more conspicuous was the enthusiastic cheerleading coming from the Trump administration. Bolsonaro has long been likened to President Trump — another angry nationalist bent on radically shifting his country to the right while trying to tear down the political achievements of opponents to the left. Former Trump adviser Stephen K. Bannon whispered encouragement to Bolsonaro’s camp; the Brazilian politician, meanwhile, launched Trumpian attacks on everything from “fake news” to refugees.

Secretary of State Mike Pompeo traveled to Brazil for Bolsonaro’s inauguration. The next day, at a news conference with new Brazilian foreign minister Ernesto Araújo, Pompeo offered lip service to concerns about human rights — provoked by Bolsonaro’s rhetoric and promises to unleash a bloody drug war in Brazil’s slums. But Pompeo and other administration officials are probably far more interested in the prospect of a new right-wing partnership between the hemisphere’s two biggest democracies.

At the same presser, Araújo — an ideologue who deemed climate change a Marxist conspiracy and once proposed a tripartite pact with “Christian nations” Russia and the United States — hailed the “realignment” being ushered in by Bolsonaro. He and his president have extolled illiberal right-wing governments in places such as Poland and Hungary while echoing Trump and Pompeo’s bromides against leftist regimes in Latin America.

Under Bolsonaro’s watch, Brazil may move its embassy in Israel to Jerusalem, a decision that would cheer the bloc of evangelical voters essential to his political success. The president also has signaled Brazil’s retreat from the fight against global warming and shares Trump’s climate skepticism.

It all marks a significant shift from the country’s previous foreign policy. “Brazil has largely avoided the gaze of the United States, exerting its influence through regional alliances and multilateral institutions instead,” wrote The Washington Post’s Marina Lopes. “Bolsonaro wants to change that. He makes the case that Brazil could be the United States’ main partner in the region to contain leftist ideologies and Chinese influence in South ­America.”

Of course, in the coming months the complexities of governance might overtake the imperatives of the campaign trail. For one, experts warn that Bolsonaro can’t follow Trump into a trade war with China. “If China decides to retaliate and make him an example, the costs for Bolsonaro will be gigantic,” Matias Spektor, who runs the Center for International Relations at Fundacao Getulio Vargas, a university in Sao Paulo, told The Post. “It’s high-risk diplomacy — a blind bet.”

For now, foreign policy is likely to take a back seat to domestic demagoguery. Like Trump, Bolsonaro may need to maintain a climate of polarization, keeping the anger that catapulted him to power on a permanent boil. But his critics warn that such tactics will lead to the erosion of Brazilian democracy.

Bolsonaro is a strong supporter of the military regime that ruled Brazil from 1964 to 1985 and is the most conservative ruler to come to power in the region in decades. His vice president and several key ministers are former military officers,” noted my colleagues on the day of his inauguration. “Lawmakers who support the new president greeted him Tuesday by pointing their fingers in the shape of a gun.”

In the past, Bolsonaro has lamented that the dictatorship didn’t torture even more leftists than it did. On Wednesday, he tweeted curiously in English about the need to “tackle the Marxist garbage” taught in the country’s schools, echoing his long-standing gripes over left-leaning teachers in the Brazilian school system.

His opponents fear the new government could reverse a generation of progress. “We were building a new Brazil little by little, a Brazil with policies of inclusion for LGBT people, women, blacks, people with special needs,” Fernanda Moura, a Brazilian history teacher, told the New York Times. “What we see is that the people who are against these social policies don’t want us to debate them. That’s why they attack schools.”

In a lengthy piece, HuffPost’s Travis Waldron argued that Bolsonaro, like Trump, is not some sui generis figure but “a creature of the rot in his country’s democratic institutions that had set in years before he’d entered the picture.”

While Bolsonaro “has pitched his surge to power as the result of a ‘populist’ revolt,” Waldron wrote, “his base of support mirrors that of the old coup masters: wealthy financial elites, segments of the population willing to trade the rights and lives of the poor and marginalized for their own safety and economic prosperity, and traditional parties and politicians who refuse to acknowledge their own roles in creating the monster before folding themselves into his arms.”

A similar confluence of forces and cocktail of angry emotions underlie Trumpism. How they get harnessed — or not — on the world stage may be a defining theme of the year ahead.

Want smart analysis of the most important news in your inbox every weekday along with other global reads, interesting ideas and opinions to know? Sign up for the Today’s WorldView newsletter.