NEW YORK -- Hungary’s top diplomat, in an interview with Fox News, praised President Trump’s push for NATO partners to boost military spending -- and said the administration's treatment of Central European countries as allies represents a stark contrast from what he called the “lecturing” of the Obama years.

“Since the current administration has been in power, the relationship has totally changed and the relationship is based on mutual respect which used not to be the case,” Foreign Minister Peter Szijjarto told Fox News. “So before this administration took office, ‘lecturing’ was basically the right expression to describe our relationship.”

HUNGARY JOINS US IN WITHDRAWING FROM UN GLOBAL MIGRATION AGREEMENT

Szijjarto’s comments come just days after Hungary and the U.S. signed a new Defense Cooperation Agreement (DCA). A State Department official told Fox News that the new agreement means the U.S. and Hungary will be “better positioned to meet and overcome current and future challenges that threaten stability in the region and beyond.”

Szijjarto hailed the agreement as a “clear signal” of the change that has come to the U.S.-Hungarian relationship since Trump entered the White House.

It is not difficult to see why the two countries have grown closer during the Trump administration. Both Hungarian Prime Minister Viktor Orban and Trump have won elections running campaigns heavy on nationalism and tough on illegal immigration (Hungary has built two border fences since 2015) -- sometimes to anger from international bodies such as the United Nations and European Union. Hungary was one of the countries to join the U.S. in withdrawing from the U.N. global pact on migration last year.

Both Orban and Trump have been criticized for their immigration policies, while liberal groups in Hungary have alleged that the Orban government is eroding judicial independence and cracking down harshly on political opposition groups -- including passing a “Stop Soros” package of laws aimed at curbing the influence of Hungarian-American left-wing billionaire George Soros in the country.

Szijjarto indicated there are similarities between the opposition facing Trump and the Hungarian government.

“We understand the global liberal political elite and global liberal media hate your president, they hate what he has been doing, but they hate what we have been doing as well,” he said.

Szijjarto, who has met with Secretary of State Mike Pompeo multiple times in the last year, pointed to an early visit to D.C. after he was appointed foreign minister in 2014 as an example of the "lecturing" relationship during the Obama administration. He said that on that visit, he was not greeted by Secretary of State John Kerry but by then-Assistant Secretary of State for European and Eurasian Affairs Victoria Nuland, who he said confronted him with a list of domestic reforms.

“She basically threw a paper on the table when we had the negotiations ... where some instructions were written how we should change our constitution, how we should change our regulation regarding media, constitutional court, churches, so on and so forth and she told me if we could comply with these instructions or advices then it would be possible to speak about enhancing the bilateral political cooperation,” he said.

“I mean, this is a clear interference into domestic issues, telling another country what to decide,” he added.

HUNGARY'S PRO-TRUMP, POPULIST GOVERNMENT PUSHES SOROS CRACKDOWN

A former senior Obama administration official disputed Szijjarto’s account, telling Fox News that the list was a response to Hungarian government complaints that it was not receiving higher-level engagement from the administration, such as a meeting with Kerry.

The Hungarian government, the official said, indicated it was willing to work with the Obama administration on U.S. concerns about what was going on in Hungary domestically.

“It was an opportunity for them to address those concerns, it wasn’t a demand sheet or a rap sheet,” the official said.

The official also said that the administration continued to work closely on a number of areas, including NATO issues, energy diversification and the crises in Crimea and Ukraine: “It wasn’t like we iced them out, but it was simply that we weren’t going to spend a lot of time endorsing the regime with higher-level engagement amid that democratic backsliding.”

But whatever happened at the meeting, there can be little doubt that the Trump administration’s approach to Hungary has been friendlier, something Szijjarto said has strengthened the U.S. alliance in the region.

“We are very happy that this administration looks at us Central Europeans as allies instead of lecturing us how to accommodate our life,” he said, calling it a “totally different approach” from the previous administration.

Szijjarto said Hungary has no issue with Trump’s push for nations to meet commitments to spend 2 percent of GDP on defense.

“We think that it was absolutely legitimate from his perspective to argue for nation’s commitments to be fulfilled as soon as possible,” he said, adding that Hungary had already met that commitment.

Trump’s aggressive stance with NATO allies, including reports that he has considered withdrawing from the alliance, has led to criticism he is weakening NATO.

But Szijjarto’s remarks echo those of NATO Secretary General Jens Stoltenberg who, in a speech to Congress this month, said that Trump’s push to increase defense spending made the alliance stronger.

“Allies must spend more on defense. This has been the clear message from President Trump,” Stoltenberg said. “And this message is having a real impact.”

CLICK HERE FOR THE FOX NEWS APP

Stoltenberg told lawmakers that European allies and Canada have spent an additional $41 billion in the last two years and that by the end of 2020, that figure will rise to $100 billion.

“That money will allow us to invest in new capabilities our armed forces need, including advanced fighter aircraft, attack helicopters, missile defense and surveillance drones,” he said. “This is good for Europe and it is good for America.”