Poland, November 25 (Reuters) – According to two sources involved with the discussions, Poland is looking for German backing to apply EU sanctions on the Polish-German part of the Druzhba crude oil pipeline, allowing Warsaw to back out of a deal to purchase Russian oil next year without incurring fines.

In order to enable Poland’s acquisition of the Russian-owned Schwedt refinery in Germany, the sources added that the two are close to a deal for Poland to coordinate oil shipments by sea via Gdansk and part of Druzhba to Germany.

From December 5, the EU has promised to cease purchasing Russian oil through maritime lines, however Druzhba is now free from sanctions. For Polish refiner PKN Orlen (PKN.WA), which has a long-term contract to purchase Russian oil through, this presents a challenge.

According to the sources, Poland’s climate ministry and Germany’s economics ministry are in the final stages of talks on a memorandum of understanding on oil logistics that could unleash non-Russian flows and help Poland’s top refiner pursue its interest in Schwedt.

A spokeswoman for the Ministry of Economics said in Berlin on Friday that Germany will continue to dispense with Russian oil from 2023 and is working on a solution with Poland to ensure supplies to Schwedt. Fulfilling pledges by Poland and Germany to stop buying Russian oil will require EU-level regulation, and both countries are working together to achieve it, Poland’s climate ministry said on Friday.

Germany has put Schwedt under a six-month trust that won’t nationalize the refinery and is looking at ways to supply it with oil.

Poland and Germany vowed in the spring to try to end Russian oil imports through Druzhba’s northern leg by the end of the year, but Orlen remains tied to his contract with Russian oil and gas company Tatneft.