Moldova and Russian energy giant Gazprom said Friday they had extended a deal to supply gas to the ex-Soviet country, which has faced severe shortages after Moscow hiked prices.
During a bitter standoff with Moscow, Moldova declared a state of emergency and for the first time signed a gas supply deal with a non-Russian country.
But on Friday both sides announced they had agreed to extend their previous agreement by five years, with deliveries to start from November 1.
"The parties reached an agreement on the price formula, the audit of the Moldova-Gaz debt and on subsequent dialogue for repayments," Moldovan foreign ministry spokesman Daniel Voda said in a statement.
Gazprom said in a separate statement that the extension was made on "mutually beneficial terms".
The agreement was reached after talks in Saint Petersburg, where Gazprom has its headquarters, between Moldova's Deputy Prime Minister Andrei Spinu and the Russian state-controlled firm's CEO Alexei Miller.
Wedged between Romania and Ukraine, Moldova has traditionally received gas from Russia via its pro-Moscow separatist region of Transnistria and through Ukraine.
But Moldova's contract with Gazprom expired in September.
Gazprom extended the contract until the end of October but raised prices, which Spinu said at the time was "not justified and not realistic" for Europe's poorest country.
As well as declaring a state of emergency, Moldova signed a contract to buy natural gas from Poland -- the first time it has turned to a supplier other than Russia.
Voda on Friday said that Moldova "received insufficient volumes of gas from Gazprom based on the one-month extension of the expired contract with a three-fold price increase".
He said the Gazprom deal had been extended "for another five years based on the price formula proposed by the Moldovan side", but did not give further details about prices.
Europe is in the throes of an energy crisis with gas prices soaring to record highs as economies come back online after the end of pandemic lockdowns and renewables like solar and wind see a slowdown in supplies.
Critics in Western capitals blame Russia for the price hikes, saying Moscow is not upping deliveries to pressure Europe to agree more long-term contracts and for the certification of the recently completed controversial Nord Stream 2 pipeline.
Some have also accused Moscow of raising prices for Moldova after the election last year of pro-European President Maia Sandu.
For its part, Moscow accused Moldova or being late on payments and had threatened to turn off the tap entirely.
EU foreign policy chief Josep Borrell on Thursday accused Russia of using gas as a "geopolitical weapon".
The Kremlin said that the gas talks were "exclusively commercial" and denied any political pressure was involved.