Hungarian Prime Minister Viktor Orban attends a news conference after his meeting with Ukrainian Prime Minister Volodymyr Groysman in Budapest on Nov. 24. (Laszlo Balogh/Reuters)

Before President-elect Donald Trump called for a clash of civilizations and suggested banning all Muslim arrivals to the United States, Hungary's prime minister, Viktor Orban, was leading the chorus.

The right-wing nationalist leader was bitterly opposed to Syrian refugees seeking to enter Europe. He declared migrants to be “poison” and fretted that the refugee exodus would threaten the continent's “Christian roots.” And his chief of staff said President Obama wanted “as many Muslims as possible in Europe.”

His government set about erecting walls to thwart the unwelcome guests and militarized the border with Serbia. In nearby Poland and Slovakia, right-wing populists echoed Orban's scaremongering over the Muslim peril.

Such politics provoked consternation in Brussels and Washington and infuriated more-liberal politicians such as German Chancellor Angela Merkel, who pushed for a joint continental plan to reckon with the refugee influx. Earlier this year, the foreign minister of Luxembourg suggested that Hungary be thrown out of the European Union for its xenophobic grandstanding, marking the first time the top diplomat of an E.U. member state has called for the expulsion of another.

But Orban has been cheered on by an ascendant far right across the West — from anti-immigrant politicians in countries such as France and Britain to the influential American website Breitbart, once overseen by Trump adviser Stephen K. Bannon and which my colleagues in The Washington Post's opinion section recently labeled a “pestilence.”

In part for these reasons, Orban was the first world leader to buck protocol and publicly come out in support of Trump's candidacy in July. “I myself could not have drawn up better what Europe needs,” he said of Trump.

After the Republican nominee's shock victory in the Nov. 8 elections, Orban said that watching the race had been the “most fun” and that he was happy to be entering a political moment where the global liberal establishment couldn't shun him for his incendiary rhetoric.

Orban declared: “We have had enough of lecturing” and “not being able to express our opinion because we are afraid that we will be morally judged.”

In the days that followed, Orban was one of many foreign leaders who spoke with Trump over the phone. According to the Hungarian prime minister, the conversation with the American president-elect was friendly and he received an invitation to travel to the White House — something the Obama administration never extended to Orban during his six years in power.

Trump “invited me to Washington, and I replied that it’s been a while since I’ve been there, since they treated me like 'black sheep,' “Orban said in an interview with Vilaggazdasag, a Hungarian business publication. “He laughed, and he said they treated him the same way.” (Trump officials have not confirmed whether this invitation was indeed made.)

Now, Orban is convinced he'll have a sympathetic ear in Washington.

“With Donald Trump, the U.S. will get a president who won’t be ideologically bound,” he said in the interview. “He’s open-minded and motivated much more by success, efficiency and results than by political theories. That’s favorable for us, because the evidence is on our side.”

What evidence Orban thinks is on his side is less clear. As a recent policy paper from the Center forAmerican Progress details, he has presided over the erosion of the country's political institutions, packed its top court with loyalist judges and imposed regulations on media that inhibit dissenting voices and promote supporters.

As Josef Janning, co-director and senior policy fellow at the European Council on Foreign Relations, told my colleague Anthony Faiola earlier this year: “Orban is playing the strong man and at the same time is trying to mobilize the power of xenophobia.” And he sees in Trump a kindred spirit.

More on WorldViews

In a first, E.U. minister calls for the expulsion of a member state

Hungary's Orban invokes Ottoman invasion to justify keeping refugees out

Everyone hates the elites. Even the elites.

Hungarians are making these creepy scarecrows to keep migrants out