European Energy Commissioner Maros Sefcovic

Russia agreed to resume gas supplies to Ukraine over the winter under a deal clinched late Friday with the European Union, capping months of difficult talks overshadowed by the Ukrainian crisis.

European Energy Commissioner Maros Sefcovic told a press conference the preliminary deal was a "crucial step" to ensure Ukraine has gas supplies from October through March and that Europe receives onward deliveries.

"We just initialled a trilateral agreement for the upcoming winter," Sefcovic said after nearly six hours of talks with the Russian and Ukrainian energy ministers in Brussels.

He added that "all technical details are agreed" and the framework was set, but confirmation and formal signing of the full agreement would require separate procedures.

He tweeted earlier it was a "major achievement."

Russia and its Cold War-era satellite Ukraine have been locked in bitter dispute for years which worsened significantly when a popular uprising ousted pro-Moscow president Viktor Yanukovych in late 2013.

As the Ukraine crisis worsened and pro-Russian rebels seized large areas of eastern Ukraine, talks on ensuring gas supplies to the country and then onward to Europe were held hostage by a conflict which has now cost some 8,000 lives.

At the end of July, Ukraine announced it was halting all Russian gas purchases because it found the price inconsistent with what Russian energy giant Gazprom charged other European clients.

In recent weeks, however, there appears to have been an easing of tensions on the ground in eastern Ukraine with a ceasefire finally holding after months of daily breaches.

At the same time, the EU pursued contacts with both sides, mindful of the approach of winter when gas demand will rise.

In previous disputes in 2006 and 2009, Moscow cut supplies to Ukraine during the winter, sparking shortages which had a knock-on effect in many former communist eastern states that still depend on Russia for nearly all their energy needs.

The EU relies on Russia for about a third of its gas supplies, with half of that amount transiting through Ukraine.