Democrats criticized President Donald Trump this week after he called Germany “a captive to Russia” over the Baltic Sea pipeline project -- even though prominent Democrats John Kerry and Joe Biden have expressed the same concerns.

Trump asserted Wednesday during a meeting with the NATO secretary-general that Germany is beholden to Russian over its involvement in the Nord Stream 2 gas pipeline project with the Kremlin aimed at doubling energy imports from the country’s state-owned energy giant Gazprom.

"I have to say, I think it's very sad when Germany makes a massive oil and gas deal with Russia, where you're supposed to be guarding against Russia, and Germany goes out and pays billions and billions of dollars a year to Russia," he said.

"I have to say, I think it's very sad when Germany makes a massive oil and gas deal with Russia, where you're supposed to be guarding against Russia, and Germany goes out and pays billions and billions of dollars a year to Russia." — President Donald Trump

The remark drew fury from top Democrats, who claimed it was an example of Trump being loyal to Russian President Vladimir Putin at the expense of America’s closest allies.

“President Trump’s brazen insults and denigration of one of America’s most steadfast allies, Germany, is an embarrassment,” House Minority Leader Nancy Pelosi and Senate Minority Leader Chuck Schumer said in a joint statement. “His behavior this morning is another profoundly disturbing signal that the President is more loyal to President Putin than to our NATO allies.”

Former Secretary of State John Kerry also condemned Trump, saying in a Twitter message that Trump’s remarks about Germany and NATO were “disgraceful, destructive and flies in the face of the actual interest of the United States of America.”

But Trump’s harsh criticism of Germany echoes statements from U.S. officials from past administrations, including Kerry himself, according to recently resurfaced videos, the Washington Free Beacon reported.

In May 2016, Kerry was speaking in Washington, D.C. together with Energy Secretary Ernest Moniz and European Union High Representative Federica Mogherini, where he expressed concerns about the very same energy project Germany is undergoing.

"We’re also going to discuss one other specific issue of deep concern to me and to everybody here, and I think that’s the Nord Stream 2 pipeline," Kerry said then. "This project has provoked a very heated debate on both sides of the Atlantic, and we are convinced would absolutely have an adverse impact on Ukraine, on Slovakia, and Eastern Europe. And we cannot lose sight of that."

Former Vice President Joe Biden also sang a different tune during his time in the office. In August 2016, Biden decried Russia’s use of its energy resources as a weapon to influence other countries and called the North Stream 2 pipeline a “fundamentally bad deal” for the continent.

"Speaking for ourselves, speaking for the United States, Nord Stream 2 pipeline, we think, is a fundamentally bad deal for Europe," he said during a visit to Sweden and Latvia. "From our perspective, it looks like a fairly bad deal … Europe needs diverse sources of gas, not, in our view, a new Nord Stream 2 pipeline, and to lock in greater reliance on Russia at this moment … I know will fundamentally destabilize Ukraine."

Biden also reportedly said Europe needs “diverse sources of gas, not new pipelines that lock in greater reliance on Russia. Russian gas can and should be part of the European market, but that market needs to be open and competitive.”

Most Eastern European countries have expressed their concern over the pipeline project over the years, claiming it directly threatens the security of their countries as Russia will able to use its vast energy resources as a way to have leverage over Western Europe.

Lithuanian President Dalia Grybauskaite sided with Trump on Wednesday after his remarks, saying that she views the project “as geopolitical, politically motivated, having no economic justification and also binding hands for some European countries to pursue a free energy policy.”

Poland’s foreign minister, Jacek Czaputowicz, also welcomed Trump’s comments, pointing out that “some countries are too close” and that the gas pipeline would help to fund the Russian military.