On Monday afternoon, Donald Trump hosted Hungary’s far-right leader Viktor Orban and praised the authoritarian prime minister for the “good job” he was doing and for being, like Trump himself, “a little bit controversial.”

The Oval Office feting was a diplomatic coup for Orban and a culmination of a two-year effort to get the two nationalist, anti-immigration world leaders in the same room, glad-handing for the cameras.

Since at least last summer, President Trump had been telling those close to him that he wanted to invite Orban to the White House for an official visit, according to two people with knowledge of the comments. Trump had spoken to Orban by phone in June, during which he congratulated him on the formation of a new government. Afterwards, the president conveyed to his advisers how impressed and taken by Orban he was.

He and Orban had discussed a number of issues and foreign policy concerns. But one thing in particular appeared to have grabbed Trump’s attention. Orban had noted Trump’s “amazing” electoral college triumph over 2016 Democratic nominee Hillary Clinton, according to a source with direct knowledge of Trump’s account of the conversation.

That overt, targeted flattery was just one method that Orban and his team used to bring about Monday’s meeting. The charm offensive was complemented by a more traditional Washington method: a lobbying campaign to help the Hungarian leader open proverbial doors in the nation’s capital.

Orban has been aided in those efforts by a group of hard-right Republican congressmen who have lobbied the administration to welcome him and pledged support for him in the face of international condemnation.

In January 2018, a group of 11 Republican congressmen sent a letter to then-Secretary of State Rex Tillerson and urged him to set up a meeting between the two leaders, arguing that Hungary is a “natural ally for the U.S.”

“In most areas our Countries’ interests and philosophy are closely aligned,” wrote the group of lawmakers, which included Rep. Mark Meadows (R-N.C.), who is a top Trump ally, and Rep. Steve King (R-IA), a supporter of European nationalists who has approvingly retweeted Orban’s anti-immigrant quotes. Other lawmakers who signed the letter include a trio of staunch Trump supporters, including Reps. Andy Harris (R-MD), Louie Gohmert (R-TX), and Paul Gosar (R-AZ).

Harris, a co-chair of Congress’ Hungarian Caucus, has said his father fought for the Hungarian army in World War II. In November 2018, after Hungary was formally punished by the European Union Parliament for anti-democratic measures, Harris went out of his way to praise Orban. He led a separate letter with 10 other Republican congressmen criticizing the E.U. for its punishment of Hungary for “exercising its rights to sovereignty and national identity.”

Harris’ office did not respond to request for comment. Meadows, who speaks regularly with the president, declined to comment on whether there had been any behind-the-scenes efforts by lawmakers to encourage Trump to bring Orban to the White House.

“Hopefully, it’s just one of many meetings with a variety of foreign powers and heads of state that will serve our country well,” Meadows told The Daily Beast on Monday.

But while those lawmakers encouraged an Orban-Trump summit, others on Capitol Hill have worried about the get-together. On May 10, the top-ranking Republican and Democratic members of the Senate Foreign Affairs Committee sent a letter to Trump to “express concern about Hungary’s downward democratic trajectory” ahead of Orban’s visit.

The senators pressed Trump to raise those issues during his sit-down with Orban. “We urge you,” they wrote, “to not diminish the importance of democratic values in our bilateral relationship with Budapest.”

The White House did not return a request for comment as to whether those issues where, in fact, discussed. But critics of Orban’s regime say that the mere act of hosting the meeting provided little benefit to Trump while helping to raise Orban’s stature.

“I think it’s a pretty big deal that the president is hosting Orban at the White House,” said Sarah Margon, the Washington director of the nonprofit advocacy group Human Rights Watch. “At a time when U.S. relations with the Germans and the French are rocky, to be inviting the Hungarian prime minister to the White House sends a very clear message about where President Trump is focused.”

Since taking power in 2010, Orban has amassed a lengthy rap sheet that has made him a pariah within the E.U. and, at least in the last administration, the United States. During his presidency, Barack Obama declined to invite Orban to Washington.

While Hungary still holds elections, Orban has taken measures to stifle democracy and benefit his Fidesz Party, having rewritten the state constitution, reshaped the country’s judicial branch, and taken control of much of the country’s media.

At the same time, Orban has put xenophobia and chest-thumping Hungarian nationalism at the cornerstone of his political movement, openly calling it “Christian democracy” or even “illiberal democracy.” He has called refugees “Muslim invaders” and declared that Hungary was Europe’s last defense against what he called Islamization.

The nationalist visions of Orban and Trump have intersected before. Like Trump, Orban has erected fences along his country’s border in order to deter migrants. And while Trump has suggested that George Soros could be behind immigration spikes in America, Orban has launched a full scale attack on the Hungarian-American liberal philanthropist, often using anti-Semitic language to do so.

Orban’s vision of a conservative, traditional nationalism has also meshed with the Trump administration’s. In March, the Hungarian ambassador hosted a conference in Washington, titled “Making Families Great Again,” to promote Orban’s plan to increase Hungary’s birth rate. In attendance that day were White House advisers Mercedes Schlapp and Katy Talento, and prominent social conservative Tony Perkins.

“The psychological profile with Trump is very clear,” said Tommy Vietor, who worked as a spokesman for the Obama-era National Security Council. “And that’s true if you’re an authoritarian leader systematically dismantling your democracy. If you look at the people who’ve been in there [in the Oval] lately, it’s been a real rogue’s gallery.”

If meeting with a widely-criticized autocrat like Orban is a risk, experts like Margon say it’s a risk that carries limited upside for the U.S. given Hungary’s recent drift toward U.S. rivals. Orban, she noted, has not proven himself “to be strong allies of the U.S.,” citing the strongman’s embrace of kindred spirits in Russia and China. In November 2018, for example, Hungary denied a Trump administration request to extradite two Russian arms dealers to stand trial in the U.S., sending them instead back to Russia. And under Orban’s leadership, Hungary has become the only E.U. member state to take part in China’s Belt and Road Initiative, a sweeping bid at global influence through commerce and infrastructure investment.

Trump might want to bring Hungary back into the U.S. fold, but there is doubt over what he could make an offer that might make that happen. “Hungary,” said Margon, “is positioned to get more out of this meeting than the U.S. is.”