President Donald Trump on Wednesday followed up on a week of bashing NATO allies on Twitter with an in-person tirade against Germany.

He said Russia basically controlled Germany because of German energy dependence on Moscow.

German Chancellor Angela Merkel has backed a massive pipeline that would allow increased consumption of Russian energy.

Russia's main source of revenue is energy exports, and Europe is its main client.

By funding Russia, Europe allows the kind of aggression from the Kremlin that NATO was designed to stop.

Germany's military has serious readiness problems, and Merkel has not prioritized fixing them.

President Donald Trump followed up on a week of bashing NATO allies on Twitter with an in-person tirade against Germany's planned energy cooperation with Russia.

In a heated meeting in Brussels with the leaders of the North Atlantic Treaty Organization, Trump claimed that Moscow basically controlled Berlin because of Germany's dependence on it for energy.

"It's very sad when Germany makes a massive oil and gas deal with Russia where we're supposed to be guarding against Russia, and Germany goes out and pays billions and billions of dollars a year from Russia," Trump told NATO Secretary-General Jens Stoltenberg at a working breakfast to open the summit.

"Germany is totally controlled by Russia," Trump said. "Because they're getting between 60 to 70% of their energy from Russia and a new pipeline."

Trump was presumably referring to Nord Stream 2, a pipeline project backed by German Chancellor Angela Merkel that will allow for more consumption of Russian energy.

"You tell me if that's appropriate," Trump said, "because I think it's not, and I think it's very bad thing for NATO."

A Reuters review of Germany's official data shows that 35.3% of its imports of oil and gas comes from Russia.

While Trump has routinely misrepresented the nature of NATO's funding and how the alliance works to share the burden of mutual defense, he's correct that energy dependence on Russia from Germany, and all of Europe, gives Moscow influence.

"Russia is so dependent on Europeans buying their energy that if Europe did even a partial embargo and cut its energy purchases from Russia in half, it would have a crippling impact on the Russian economy and make it impossible for Putin to pay for his foreign aggression," Jorge Benitez, a NATO expert at the Atlantic Council, previously told Business Insider, mentioning Russian President Vladimir Putin.

Russia's main source of income is energy exports. With oil prices plummeting over the past few years, Russia's economy has suffered greatly. But it has actually increased exports to Europe over the past few years, helping it carry out the type of foreign military interventions that NATO was designed to stop.

Europe, which is Russia's main client, bought almost 30% of its oil from Russia in 2014 when Russia illegally annexed Crimea. In January, Russian gas exports to Europe hit an all-time high, with Russia controlling about 40% of Europe's supply.

Experts have consistently warned that Russia uses Europe's energy dependence to influence its policies.

The Trump administration has tried to compete with Russia in the energy sector in Europe, but the US relies on shipping tankers of natural gas and oil, a process likely to be undercut by a pipeline like the Nord Stream 2.

Germany has a big target on its back

A German air force Eurofighter Typhoon taxiing toward the runway at Eielson Air Force Base in Alaska before departing for a combat-training mission in 2012. Tech Sgt. Michael Holzworth

Trump's attack comes at a time when Germany, Europe's biggest economy, spends relatively little on defense and has a woefully unprepared and inoperable military.

In May, the German news outlet Der Spiegel reported that only four of Germany's 128 Eurofighter Typhoon fighter jets were ready to fly combat missions. Germany's defense minister has called the country's defense spending "inadequate" as Merkel prioritizes social works instead.

About 35,000 active-duty US troops were stationed in Germany last year.

Germany spends 1.24% of its gross domestic product on defense but has committed to hitting 2% by 2024, something Trump, and other US leaders before him, have tried to hasten.

Defense spending is unpopular in Germany, however, and Trump may only make that problem worse with Merkel struggling to hold together a weak coalition government.

"I think the president is right," Mark D. Simakovsky, an Atlantic Council expert who previously served as the Europe/NATO chief of staff in the Office of the Secretary of Defense for Policy, told Business Insider.

"He does need to call for more burden sharing. Allies are not doing enough to provide adequate security. He's right to go to Europe criticizing and complaining to NATO allies, but he's not right in using that as the only issue he's focused on."

"Germans need to do more and can afford to do more," on defense spending, Simakovsky said, but "you can make it harder to meet that threshold when Trump is so unpopular."