Günther H. Oettinger, the European Union energy commissioner, met Friday in Berlin with the energy ministers of Russia and Ukraine to urge the two sides to reach an agreement that would resume the flow of natural gas from Russia to Ukraine for a set price during the winter.
Russia’s natural gas giant, Gazprom, cut off supplies to Ukraine this summer after the two countries failed to reach an agreement on how much Kiev owes Russia for past deliveries.
Under Friday’s deal, which Moscow and Kiev are expected to approve by next week, Ukraine would pay Russia $3.1 billion toward its outstanding bill, in two separate installments by the end of the year.
In exchange, Gazprom will ensure that at least 5 billion cubic meters of gas are supplied to Ukraine from October to March at the set price of $385 per 1,000 cubic meters, which must be prepaid before delivery.
Mr. Oettinger said the European Union would guarantee a loan from the International Monetary Fund to help Ukraine meet its debt payments.
The deal foresees an initial installment of $2 billion due by the end of October, with the outstanding $1.1 billion due by the end of December.
“The details of the winter package are satisfactory,” Alexander Novak, Russia’s energy minister, told reporters.
“I think a big step has been taken.”
The urgency of reaching a deal was made clear hours before the talks concluded, when Hungary made a surprise announcement that it would not sell natural gas back to Ukraine that it had obtained from Russia but did not need.
Hungary apparently buckled to Russian pressure not to engage in such business — known as reverse flow — after a visit to Budapest on Monday by Alexei Miller, the chief executive of Gazprom.
He met with Prime Minister Viktor Orban, who had seen deliveries sharply reduced to Slovakia and Poland after they sold Russian gas back to Ukraine.
Hungary, Slovakia and Poland are the three main conduits for reverse flow deliveries, an effort backed by European Union officials in Brussels to meet Ukraine’s energy needs through the purchase from European countries of any natural gas supplies they have left over from Gazprom.
Russia and Ukraine have been sparring over gas bills since February, when pro-European protesters drove President Viktor F. Yanukovych from office in a fury over corruption and his pro-Russian policies.
After that, Gazprom cut off supplies to Ukraine, putatively in a dispute over the size of Kiev’s outstanding bill, which Gazprom has put at anywhere from $3 billion to over $5 billion.
But supplies intended for European countries beyond Ukraine continued to flow.
An arbitration court in Stockholm is expected to rule on the question of past and future prices in the second half of 2015.
A Hungarian pipeline operator, FGSZ, said it had suspended deliveries to Ukraine indefinitely, citing the need for technical work to “manage the security supply” in the face of increasing demand.
Helen Kearns, a spokeswoman for the European Commission in Brussels, noted that Brussels expected “all members to facilitate reverse flows,” as was agreed to by the European Council.
“It is worth recalling that there is nothing preventing E.U. companies to dispose freely of gas purchased from Gazprom, and this includes selling this gas to customers both with the E.U. as well as to third countries such as Ukraine,” Ms. Kearns said.
Chancellor Angela Merkel of Germany has pressed for a deal on Russian gas supplies and prices to avoid any repeat of 2009, when a price dispute between Russia and Ukraine choked off supplies to other European countries that receive their natural gas from pipes through Ukraine.
Ukraine uses about 50 billion cubic meters of gas a year, according to government officials and outside experts.
Domestic production is about 20 billion cubic meters, said Anders Aslund, a Swedish analyst of Russia and the former Soviet Union, and Ukraine has an estimated 16 billion cubic meters now in storage.
Under plans laid before Friday’s deal, the European Union agreed that Ukraine would get about 12 billion cubic meters in reverse flows, and the shortfall would come either from saving on heating and lower demand because of declining industrial production and the destruction of plants in the war-torn Donbass region of southeastern Ukraine.
Mr. Aslund and other outside experts have been critical of Ukraine’s subsidies for energy, which they argue eat up almost 10 percent of the gross domestic product and essentially benefit a handful of oligarchs in a country teetering on the brink of bankruptcy.
Nevertheless, with parliamentary elections due in late October, politicians are unlikely to impose what could be depicted as further hardship on voters.
Source: The New York Times