With the successful presidential election of Petro Poroshenko behind them, Ukrainians must now resolve a lingering energy-security paradox: how to ensure continued supply of Russian gas while moving aggressively to diversify away from those supplies.

Both sides are running out of time to settle the debt Ukraine owes for past gas supplies and to decide on a fair price for the vital heating and electricity fuel. Russia's state-owned gas company Gazprom has threatened to shut off gas supplies in less than a week if Kiev and Moscow do not come to some kind of agreement.

On Monday, European officials reported progress toward a deal that would have Ukraine pay back about $2.5 billion of the $3.5 billion Russia says it owes. Still, officials in both Kiev and Moscow have been more skeptical. Last week, Russia signed a major gas deal with China, giving it more leverage to drive a hard bargain in Europe. On Tuesday, Ukrainian Prime Minister Arseniy Yatsenyuk accused Russia of stealing $1 billion worth of oil and gas when it annexed Crimea and its offshore resources. Neither side seems able to agree on a price for future gas supplies: Moscow wants to charge the $485 per thousand cubic meters of gas agreed upon under a 2009 contract, while Kiev believes it should stick to last year's discounted rate of $268.50 per thousand cubic meters.

"So far there is not yet a decision taken, and I also assume that from the Russian party no decision has been taken yet," Ukraine's energy minister Yuri Prodan said, as reported by German news agency Deutsche Welle. "It was a suggestion by the European Commission to be discussed."

A failure to resolve this latest gas dispute threatens to derail the success of the democratic elections held Sunday, and Russia's recognition of those elections. It would likely result in a partial or complete shut-off of gas supplies to Ukraine – which also acts as a transit country for much of the gas Europe imports from Russia. The onset of summer and European efforts to diversify its energy supply would soften the blow of such a disruption, but it remains in everyone's interest to sustain energy trade between Russia, Ukraine, and the European Union.

"[T]he immediate issue is to negotiate a reasonable peaceful co-existence with Russia," Mats Lundin, vice chairman of the board of the European-Ukrainian Energy Agency, a Kiev-based advocacy group, writes in an e-mail. "Both Russia and Ukraine depend on natural gas transit to the European Union and will have to find common solutions."

In the long term, Mr. Poroshenko has pledged to find additional sources to fulfill Ukraine's heating and electricity needs and clean up the corruption that has stunted growth in the energy sector.

"Gas has been an object of corruption for many years at all levels, including the highest levels of the prime minister and president. It's not going to happen again," he told a press conference in Kiev Monday, as reported by Interfax-Ukraine. "We are looking to turn gas from Russia's 'energy club' into a commodity."

There are other ways Ukraine can diversify its energy supply: Officials are already working on reversing gas pipelines from Hungary, Slovakia, and others to boost gas supplies from its western neighbors. More efficient buildings and power plants could reduce the total amount of gas it needs, and a buildup of wind and solar could offer alternatives to fossil fuels. With the right amount of foreign investment, Ukraine could develop its own shale gas resources or import liquefied natural gas from North Africa, the Middle East, or eventually the United States.

"[T]he core task should be deep diversification of gas sources," Alexander Paraschiy, head of research at Concorde Capital, a Kiev-based investment firm, writes in an e-mail. "In such [a] case, Ukraine can claim it [will become] energy-independent."