Russia is adopting a more flexible policy toward Europe’s big energy companies in order to maintain its lucrative markets in Western Europe. The times when Gazprom, Russia’s state-owned giant, could insist on long-term contracts for its gas, and link its prices to oil, are almost over.

In hindsight, the Russian-Ukrainian dispute of 2006 and 2009 that disrupted the flow of Russian gas to Europe was one of the best things that could have happened to Europe. Countries began to diversify their supplies.

Even in some parts of Eastern Europe that are completely dependent on Russian energy, governments have decided to take a stand against Russia exploiting its monopoly. The European Commission is investigating claims by Lithuania against Gazprom’s opaque pricing policy. Meanwhile, the EU’s Third Energy Package, which is designed to liberalize Europe’s energy sector, will slowly break up Russia’s monopolistic practices.

But don’t think for a moment that Russia is in retreat from Eastern Europe—it isn’t. It continues to use its energy dominance as a powerful foreign policy tool.

Russia could not prevent the former Communist states of Central and Eastern Europe from joining the EU and NATO. But that has not stopped Moscow from using its energy dominance to maintain a hold over some of these countries in a way that weakens their democracies.

Take Bulgaria, where the government collapsed last month. The public, fed up with rising energy prices, had taken to the streets. The government did little to explain the spike in the cost of energy. How could it? Besides being highly inefficient, the sector is dominated by Russian and Bulgarian oligarchs. Together they have perpetuated a culture of corruption, accompanied by a lack of transparency and competition.

Reports by the European Bank for Reconstruction and Development, Transparency International, and Freedom House show that corruption persists in several other East European countries as well. All too often, kickbacks are an intrinsic part of business practice, from issuing tenders to obtaining building permits.

But the most pervasive form of corruption is in the energy sector, where it has been very difficult to break the umbilical cord between Gazprom and Russian and local oligarchs. This has made it tough for outside investors to enter the sector.

Keith Smith, an energy expert and former U.S. diplomat who served in several East European countries, laments Russia’s grip over the region’s energy sector and how it hinders Western investors.

“Western energy firms too often confront demands from governmental officials and Eastern energy companies to engage in shady business practices when considering investment decisions, long-term sales contracts, and accounting procedures,” he argued.

The negative effects of corruption in the energy sector should not be underestimated. Inflated energy prices mean that industry suffers higher costs and reduced competitiveness. The culture of bribery has a debilitating effect on democracy and the rule of law.

Bulgaria is by no means an exception. Russia is meddling in the energy sectors of Hungary, Lithuania, Poland, and Slovakia, as well as throughout the Balkans. In all of these countries, Moscow has been trying to buy into the large energy companies.

Now, Russia is also working hard to gain a foothold in the nuclear energy sector. In Bulgaria, it hopes that the new government—with some nudging from the oligarchs—will come to the conclusion that nuclear energy is cheaper and cleaner than electricity from other sources.

Russia is busy courting Hungary, too. It has been amazingly successful, considering that Prime Minister Viktor Orbán and his conservative Fidesz government used to be staunch critics of the previous socialist government’s close ties to the Kremlin and its support for Gazprom’s South Stream pipeline project.

But last January, Orbán was in Moscow for talks with President Vladimir Putin about Russian help for the expansion of the Paks nuclear power plant in Hungary. Orbán did not hesitate to accept Putin’s offer. Hungary, he argued, already uses Russian technology and nuclear fuel in Paks. Energy experts doubt that the tender process will be transparent.

Russia is also busy planning nuclear power plants in its Kaliningrad exclave and in Belarus. Once built, it will be very difficult to diversify energy sources and counter corruption. So far, Lithuania has rebuffed Moscow’s advances.

The nexus between corruption and energy can be broken in three ways. The first is a faster diversification of energy sources in Eastern Europe, by connecting electricity and other energy grids, building terminals for liquefied natural gas imports, and developing shale gas. This is happening—but it is a slow and costly process.

The second way is by opening up the sector to competition, something that the European Commission is pushing for—and aggressively.

The third is a concerted effort by civil society movements to campaign for more transparency and less corruption. That is a huge task. The local and Russian oligarchs are there for the long haul. Their enduring presence endangers democracy and stability.