Moscow had warned the dispute could threaten oil deliveries to EU states
Russia has signed an oil transit deal with Ukraine, apparently ending a threat to cut supplies to EU countries.
Moscow has agreed to a 30% increase in the transit tariff for oil piped to Europe through Ukraine, according to Ukraine's state energy firm Naftogaz.
Moscow confirmed a deal had been signed, but did not comment on the details.
Vladimir Putin had earlier accused Kiev of abusing Russian oil transits but said he hoped a deal would be reached.
"We are ready to deliver, we have a contract, but if any of the transit countries abuse, what can you do?" said the Russian prime minister.
Nikolai Tokarev, head of Russian pipeline company Transneft, said on Monday that Ukraine had demanded higher payments for the transit of Russian oil, changing the terms of a 2004 contract and thereby raising the prospect of a year-end energy dispute.
Russia said the dispute could cut supplies to the Czech Republic, Slovakia and Hungary - all EU members.
A Russia-Ukraine gas dispute last January cut supplies to Europe
The EU welcomed the signing of Tuesday's deal.
"I am also very glad to note that the Russian and Ukrainian sides have meanwhile found an agreement avoiding a disruption of oil supplies to the EU," said the bloc's Energy Commissioner Andris Piebalgs.
Last month Moscow said it had reached a deal which should prevent a repeat of the gas supply crises of recent years.
It agreed to ease the terms under which it supplies gas to Ukraine after talks between Russian Prime Minister Vladimir Putin and Ukraine's Yulia Tymoshenko.
Moscow said that deal should prevent disruption - last January, many countries in Europe were left short of gas due to a payment dispute between Moscow and Kiev.
Russia provides about a quarter of the gas consumed in the EU and 80% of that is piped through Ukraine.