WASHINGTON – President Donald Trump praised Hungarian Prime Minister Viktor Orban on Monday, saying he is doing a "tremendous job" despite outrage over the Eastern European leader'scrackdowns on Hungary's judiciary and the country's independent media.

"Viktor Orbán has done a tremendous job in so many different ways," Trump said before a private meeting with him in the Oval Office. "Probably, like me, a little bit controversial, but that's okay ... You've done a good job and you've kept your country safe."

The prime minister returned the favor by complimenting Trump and highlighting their similar hard-line positions on immigration.

Some U.S. lawmakers and international organizations, citing the authoritarian record of the prime minister whom critics call the "Viktator," said Trump shouldn't have even granted a White House meeting to Orban, much less lauded him in public.

"Once again, President Trump is kowtowing to foreign autocrats without regard for America's principles and interests," said House Majority Leader Steny H. Hoyer, D-Md. Hoyer said it was disturbing that Trump would host "a leader who has subverted democracy in his country and suppressed freedom of the press and civil institutions."

Once considered a centrist – during a first stint as prime minister in 1999, he backed Hungary's membership in NATO as a way to reduce Russian influence – Orban is now a hero to right-wing nationalists. He is seeking to get closer to authoritarian regimes like Russia, Turkey and China.

Saying he wants “an alternative to liberal democracy," Orban has instituted restrictions on immigrants and refugees seeking to enter his country. That effort includes construction of a razor-wire fence at Hungary's border.

Orban also successfully pushed for a new law that, among other things, made it a crime to help immigrants in Hungary. The measure sparked widespread condemnation and prompted Hungary’s suspension from its European Union’s parliamentary.

“The primary aim of this legislation is to intimidate, by means of criminal law, those who fully legitimately assist asylum seekers or foreigners, protecting humanitarian values and the right to a fair procedure,” the Hungarian Helsinski Committee said in a statement at the time. “It threatens jail those who support vulnerable people. This runs counter to all we consider as the rule of law, European and Christian values."

Orban shrugged off a question Monday about whether Hungary's democracy was eroding on his watch.

"We are proud to stand together with the United States on fighting against illegal migration, on terrorism, and to protect and help the Christian communities all around the world," he said.

And Trump also came to his defense, asserting that Orban is "highly respected all over Europe" and that "he's done the right thing, according to many people, on immigration."

By promoting media organizations loyal to him, and cutting back on the authority of the judiciary, Orban's critics say he is looking to silence institutions that could challenge his rule. Orban also closed Central European University in Budapest because it received funding from billionaire philanthropist George Soros, a native of Hungary.

In a 2017 speech, Orban praised both Trump and his 2016 presidential campaign slogan, "America First."

Lawmakers in both parties had urged Trump to confront Orban on his efforts to consolidate power and restrict democracy in Hungary.

“Under Orban, the election process has become less competitive and the judiciary is increasingly controlled by the state,” Sen. James Risch, the GOP chairman of the Foreign Relations Committee, wrote with other lawmakers in a letter to Trump on Friday.

Risch and the other senators warned that Orban’s government has also clamped down on press freedom, and they raised alarms about Hungary’s growing alliance with Russia.

“While the U.S. has sought to counter Kremlin aggression across Europe, we remain profoundly concerned about the close relationship between (Hungary) and Moscow,” Risch and the other senators wrote.

Other critics have been more pointed, blasting Trump for even inviting Orban to the White House.

“The visit is a grievous mistake – not just because it will be seen as an endorsement of a leader who has successfully dismantled a democracy, but also because it will signal affirmation of an agenda that is fundamentally threatening to transatlantic security,” Rob Berschinski, senior vice president for policy at Human Rights First, and Hal Brands, an international studies professor at Johns Hopkins University, wrote in a recent Washington Post op-ed.

“Over the past nine years, the Hungarian leader has accomplished many of the anti-democratic actions Trump can only tweet about,” they write, pointing to Orban’s overhaul of Hungary’s constitution and the weakening of Hungary’s judiciary, among other steps.