IF THERE were any remaining doubts that the rise of right-wing nationalism is a global phenomenon, Brazil has ended them. On Sunday, the country decisively chose as its next president Jair Bolsonaro, a former army officer who crusaded against the political establishment and made insults and threats against leftists, racial minorities, gay people and women his calling card. If that sounds familiar, it’s not by accident: Mr. Bolsonaro heaped praised on President Trump and adapted some of his tactics and rhetoric. He relied heavily on social media while condemning “fake news” and promising to make Brazil great.

Unfortunately, Brazil’s incoming leader looks more extreme than Mr. Trump and most of the other populists who have risen to power in Europe and Asia — and he poses a larger menace to democracy. Like Rodrigo Duterte of the Philippines, Mr. Bolsonaro threatened to unleash state-sponsored violence against real and suspected criminals. He has vowed to jail or exile his political opponents and pack the supreme court with his supporters. As an ardent admirer of Brazil’s last dictatorship, which yielded to democracy only in 1985, he would surprise few if he tried to create its 21st-century equivalent.

That the world’s fifth-largest country has come to this pass reflects the deep disillusionment of many Brazilians with democracy following the corruption and serial failures of the political establishment over the past three decades. Two of the five most recent presidents were impeached; a third, the leftist Luiz Inácio Lula da Silva, was imprisoned for corruption; and the last, Michel Temer, has dodged criminal charges only because of his office. In the past several years, scores of congressmen were implicated in a massive kickback scandal, even as the economy foundered and violent crime rates soared.

Like a lot of those who supported Mr. Trump, many Brazilians said they backed Mr. Bolsonaro in spite of his rhetoric, because of their contempt for the alternatives — especially the leftist Workers’ Party, which they rightly blame for wrecking the economy. Business owners are hopeful that Mr. Bolsonaro will follow the prescriptions of his top economic adviser, a University of Chicago-trained liberal who favors privatizing state companies and pushing through a desperately needed reform of the pension system. But Mr. Bolsonaro has rejected those policies in the past and said little about the economy during his campaign.

After his victory was announced Sunday, he issued a diplomatic call for national unity and said his government would respect “the constitution, democracy and liberty.” Whether that happens in practice will depend on whether Brazilians step up to defend their hard-won civil rights — and whether they have the support of other democratic nations, including the United States.

Given their apparently warm relations, Mr. Trump — who made what was called “a very friendly” call of congratulations Sunday — would be well positioned to steer Mr. Bolsonaro away from abuses of democratic norms or human rights. The White House hasn’t been inclined to exert such influence on Mr. Duterte or other allies, to its own cost: Witness the damage done to U.S. Mideast policy by the overindulgence of Saudi Arabia’s Crown Prince Mohammed bin Salman. Brazil would be a good place for a change of approach.

Read more: