Germany isn't the only country that still needs cheap Russian gas

The secret behind Vladimir Putin's power
The secret behind Vladimir Putin's power

Russian gas is a thorny issue in Europe. Many countries continue to rely on Moscow for much of their energy imports despite continued geopolitical tensions.

It came up again on Wednesday. President Donald Trump scolded Germany over its reliance on Russian gas.

"Germany is a captive of Russia," he said at a meeting with NATO Secretary General Jens Stoltenberg. "It's very inappropriate."

There's a long backstory. The European Union imposed sanctions on Russia over Moscow's actions in Ukraine in 2014, and has condemned its connection to the poisoning of former Russian spy Sergei Skripal in the United Kingdom.

But the hostility ends when it comes to energy, because European leaders are well aware that millions of homes would be without heating if Russia turns off the gas taps.

Germany gets about a third of its gas from Russia

The European Union imports 69% of its natural gas, according to the European Commission. The latest available data show that 37% of the imported gas comes from Russia, about 33% from Norway and 11% from Algeria.

According to official government data, Germany imports roughly 94% of its natural gas. In 2015, the most recent year for which official data are available, 35% of the imports came from Russia, while 34% was sourced from Norway and 29% from the Netherlands.

While the European Union vowed to cut its dependency on Russian gas after the crisis in Ukraine, Russian exports to Europe have risen to record levels in the past two years.

Cheap but risky source of energy

One major factor is the price of Russian gas — it's cheaper than alternative supplies, including shipments of liquified natural gas (LNG).

American producers have been trying to export more natural gas to Europe, but they mostly haven't been able to offer prices that can compete with Russia.

Related: OPEC and Russia to pump more oil 'in the near future'

A number of EU countries, particularly those closest to Russia, are still almost completely dependent on Moscow for their gas.

What's more, much of Russia's natural gas is pumped through Ukraine, a risky route given the conflict between the two countries.

Russia needs Europe, too

baumgarten austria natural gas
A gas hub in Baumgarten in Austria.

Russia has cut off gas supplies to Ukraine in the past, and Europe is worried it could use energy as a weapon again in the future.

But Moscow also needs revenue from its gas business.

Plans for a new gas pipeline that would bypass Ukraine have been in the works for years, but Europe is deeply divided over the project.

Opponents say the Nord Stream 2 pipeline would only increase the European Union's dependence on Russia. Trump criticized the plan on Wednesday, saying that it was inappropriate for Germany to pay "billions and billions of dollars" to Moscow for energy deals and the new pipeline.

Germany and some other countries argue that it would give Europe more energy security.

The planned pipeline is likely to increase EU gas imports from Russia. But an expected decline in Europe's own production means supplies from Russia need to increase whether or not the project is completed.

"If Russia supplies 30% or 50%, either way there is no way Europe could get through a winter without that gas supply," said Trevor Sikorski, an analyst at Energy Aspects. "We are already dependent."

Dependent for decades

Still, the European Union has taken some steps to wean itself off Russian gas. It has invested in LNG import terminals in Poland and Lithuania, making it possible to use other suppliers.

Europe has also built better pipeline links between nations, so it can send gas back and forth where needed, while keeping prices competitive.

However, Europe is likely to remain dependent on Russian gas for decades to come.

Personal Finance

LendingTree

CNNMoney Sponsors