Russia has agreed to pay Kazakhstan a fixed per-barrel rate of compensation for tainted oil, industry sources said on Wednesday, a breakthrough in an oil contamination crisis that disrupted Russian and Kazakh flows earlier this year.

It is the first such deal and could serve as a template for other agreements, including with Western buyers of Russian oil.

Russian oil flows have been contaminated with chemicals along several transit routes since the end of April. Around 700,000 tons of Kazakh oil sent via Russia were also affected.

Russian pipeline monopoly Transneft has agreed a preliminary deal under which it will pay a fixed rate for the contaminated oil to Kazakh pipeline firm KazTransOil or Kazakh oil producers, the sources said.

The sources declined to be identified because the talks are confidential. The sources did not disclose the dollars-per-barrel discount, saying the deal would be finalized next week.

Transneft’s agreement to pay a fixed amount will be seen as a breakthrough by the industry after weeks of mixed messages from the company on how it would compensate for losses.

“We are waiting for documents from Transneft… We have held the talks,” a KazTransOil spokesman said on Wednesday.

Transneft did not respond to a request for comment.

On Tuesday, KazTransOil said it had agreed a mechanism with Transneft on compensation for Kazakhstan’s share of the contaminated Urals oil.

KazTransOil gave no details of the proposed calculation mechanism or sums to be paid, adding that Transneft would provide such information to concerned parties.

Up to 5 million tons of oil contaminated with chemicals have been shipped by Russia from the Baltic port of Ust-Luga and via the Druzhba pipeline to central Europe since April.

The deal with Kazakhstan will be closely watched by Russian oil producers Rosneft and Surgut, which are also seeking compensation and will in turn have to pay reparations to buyers of their crude — Western oil majors and traders.

Transneft will have separate compensation agreements with Rosneft and Surgut, the industry sources said. It was unclear whether those arrangements would mirror the deal with Kazakhstan.