Imagine that, former President Barack Obama and his administration lecturing others from atop a perch of phony sanctimony.

Hungary’s top diplomat, Foreign Minister Peter Szijjarto, didn’t mince his words in expressing his appreciation for the Trump administration after the Central European country endured 8 years of self-righteousness from the Obama administration.

“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,” Szijjarto told Fox News. “So before this administration took office, ‘lecturing’ was basically the right expression to describe our relationship.”

The remark and a new agreement between the two countries dispels the notion that President Trump’s push for improved military spending from NATO allies weakens the military alliance.

As for the lecturing, smug superiority is an Obama trademark.

Szijjarto recalled a 2014 meeting during an interview with Fox News that captured the “lecturing” disposition of the previous administration.

In visiting Washington, D.C., he said he was met by then-Assistant Secretary of State for European and Eurasian Affairs Victoria Nuland, rather than of Secretary of State John Kerry.

Nuland essentially dropped a list of domestic reforms Hungary needed to address if the country wanted to meet with Kerry.

“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,” Szijjarto said.

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

Szijjarto said the friendlier reception from the current administration was a “totally different approach” from the Obama administration.

“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.

The United States and Hungary signed a new Defense Cooperation Agreement, which Szijjarto pointed to as a “clear signal” of improved relations under President Trump, according to Fox News.

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,” a State Department official told the network.

The two countries have grown closer during the Trump administration because they share some commonalities.

“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,” Fox News reported.

Hungary is unapologetic about not opening its borders to the wave of Muslim refugees who have descended upon Europe, bringing its own set of problems to the continent.

Under current leadership, both countries seem to understand the threat posed by left-wing billionaire George Soros, a Hungarian-American. Hungary passed a “Stop Soros” package of laws in an attempt to curb his influence in the country.

“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,” Szijjarto said.