(Adds details, quotes, background)
MOSCOW/KIEV, Dec 20 (Reuters) - Russia and Ukraine are moving closer to settling a legal dispute over the supply and transit of natural gas between the former Soviet states, two sources close to the talks told Reuters.
The row has prevented a new deal to supply Russian gas to Ukraine and the rest of Europe, with an existing supply agreement due to expire at the end of December.
Russia has offered to pay Ukraine about $3 billion, while Kiev has signalled it may drop a $12 billion legal case in response, the sources said on Friday.
Kremlin-controlled Gazprom supplies more than 36% of the European Union's gas market and Brussels fears Russian supplies through Ukraine could be suspended.
Talks mediated by the European Commission to secure a new gas pact and ensure no supply disruption continued on Friday.
Russian President Vladimir Putin said that Moscow aims to reach a new gas transit deal with Kiev, with "mutually beneficial (conditions), without creating risks for both sides".
This followed a statement by European Commission Vice President Maros Sefcovic on Thursday which said that Russia, Ukraine and the EU had agreed in principle on the new gas deal starting after Jan. 1, 2020.
The gas row is part of a wider dispute between Russia and Ukraine, with Kiev caught in a tag-of-war between Moscow and the West for influence over it.
The Russian offer of $3 billion is in line with the amount proposed in arbitration rulings between Gazprom and Ukrainian energy firm Naftogaz in 2018.
Ukraine and Russia have been at odds over gas prices for years and relations between the two countries blew up in 2014 after a pro-Russian Ukrainian leader was overthrown.
Moscow responded by seizing Ukraine's Crimea peninsula and backing pro-Russian separatists in eastern Ukraine, where fighting has killed more than 13,000 people.
Naftogaz has also submitted a new claim to the Stockholm arbitration court for around $12 billion from Gazprom related to a transit contract.
Two sources familiar with the talks said that Kiev was ready to drop this second claim as part of a wider package agreement, which includes conditions on Russian gas transit via Ukraine, its key route for fuel supplies to Europe.
Russia's Energy Ministry and Gazprom did not respond to requests for a comment. Ukraine's Energy Ministry and Naftogaz declined to comment. (Additional reporting by Olesya Astakhova Additional reporting and writing by Vladimir Soldatkin Editing by Katya Golubkova, Edmund Blair and Alexander Smith)