Ukraine's internal political tensions had spilled into the open: the security services, under the control of the president, had raided the state energy company, controlled by the prime minister.

At stake was control of the multi-billion dollar gas import and transit business.

"There are many many people in [the Ukrainian] political elite who made money out of this and who are still making money out of this," said Nico Lange, the Kiev-based director of the Konrad Adenauer Foundation, a German think-tank close to Chancellor Angela Merkel's Christian Democrats.

Germany is one of the largest importers of Russian gas, and Mr Lange is a veteran observer of the gas trade between Russia and Ukraine.

He believes these vested interests among the political elite will try to prevent reforms in the energy sector.

'Gas Princess'

Both the frontrunners in the upcoming presidential election have a strong interest in the gas trade.

Viktor Yanukovych, currently ahead in the polls, has his political heartland in the east of the country, whose heavy industries need vast quantities of Russian gas to function.

His nearest rival, Yulia Tymoshenko, the current prime minister, made her money in the gas trade in the 1990s and has been nicknamed the Gas Princess.

Yanukovych was denied the presidency in 2004 due to fraud claims

On the face of it though, when it comes to trading gas between Russia and the EU, there should be no problem.

Russia has huge reserves of natural gas, which Europe needs. The question is, how to get that energy from the gas fields of Siberia to its European customers.

Under Stalin, the Soviet Union began construction of what became an extensive network of pipelines running from the east, funnelling gas into vast storage facilities on its western border, from where it could be easily supplied to Europe.

The trade continued even during the tense standoff of the Cold War. Supply and demand trumped ideology.

But when the Soviet Union collapsed, Gazprom, the newly created Russian state energy company, suddenly found that crucial elements of that network were located in a different country: independent Ukraine.

Endangered independence

Still, for a decade and a half, the trade continued uninterrupted. Ukraine got cheap subsidised gas in return for allowing Moscow to effectively control the pipeline and storage system.

If we want to continue our role as the biggest transitor of Russian gas, we should think about the most effective transit system

The Orange Revolution in the winter of 2004 installed a pro-Western president in Kiev. Viktor Yushchenko made it clear early on that he was no longer willing to dance to the Kremlin's tune.

"Control over the Ukrainian gas system is a question of Ukrainian sovereignty and finally of Ukrainian independence," said Nico Lange.

"If the Russian side - and this I think this has been and is still the long-term interest of the Russian side - gains control over the very huge transport system that is installed in Ukraine, this is a danger for Ukrainian independence."

New accord

The European Union has made it very clear it wants to see wholesale reform in the Ukrainian gas sector, to make the business more transparent.

Vladimir Putin has virtually endorsed Yulia Tymoshenko's candidacy

But Brussels has been frustrated by an apparent lack of resolve on the part of Ukrainian politicians.

This January, the anticipated gas crisis never happened. In November last year, Yulia Tymoshenko signed a new accord with her Russian counterpart, Vladimir Putin.

Russia agreed to waive stiff penalties for Ukraine, making it easier for Kiev to pay its bills. Mr Putin made it clear he was "comfortable" working with Mrs Tymoshenko when it came to the most sensitive - and lucrative - aspect of relations between the two countries.

This amounted to a virtual endorsement of her candidacy for the post of president. It is not clear what, if anything, Mrs Tymoshenko promised Mr Putin in return.

Her rival, Viktor Yanukovych has criticised the deal, saying it is bad for Ukraine. But his policies on gas are still likely to be more acceptable to the Kremlin than those of the current president, Viktor Yushchenko.

Back-room deals

In an interview with the BBC, Mr Yanukovych's foreign affairs spokesman, Leonid Kozhara, said he could not rule out selling off part of Ukraine's network of pipelines and storage facilities to foreign companies, including Gazprom.

Mrs Tymoshenko and Mr Yushchenko were once close allies

"If we want to continue our role as the biggest transitor of Russian gas, we should think about the most effective transit system," he said. "Without Russian and European investment, this simply cannot happen."

Moscow has made no secret of the fact that it would like more control over Ukraine's gas transit system. The EU, on the other hand, wants to lessen its dependence on Russia and diversify its energy sources.

The current agreement between Moscow and Kiev seems to have averted a crisis this January. But much of the fine print has not been made public.

While the gas trade is conducted in back-room deals, shrouded in secrecy, it will continue to be a potential instrument of geopolitics, and Europe's energy supply remains far from secure.

This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.