Russia has agreed to resume gas supplies to Ukraine over the winter.
The deal, brokered by the European Union, will ensure gas supplies to EU countries via Ukraine are secure.
It follows months of talks between EU officials and the Russian and Ukrainian energy ministers, BBC reports.
The total package is worth $5.8bn, with money coming from the International Monetary Fund as well as the EU.
The terms include the EU acting as guarantor for Ukraine's gas purchases from Russia and helping to meet outstanding debts.
European Union energy chief Guenther Oettinger said he was confident that Ukraine would be able to afford to pay for the gas it needed.
He added that the agreement might be the "first glimmer" of hope in easing tensions between Russian and Ukraine.
European Commission President Jose Manuel Barroso said: "There is now no reason for people in Europe to stay cold this winter.''