Russia may hesitate to strike a multiyear deal with the European Union and Ukraine on natural gas supplies after an EU court ruling on a key German pipeline.

The judgment last week reduces the options Gazprom PJSC has to ship billions of dollars of gas to its biggest market without using Ukraine’s pipeline network. But Russia may see the logic in the decision as flimsy and consider it to be a political rather than a valid legal move, said Katja Yafimava, a senior research fellow at the Oxford Institute for Energy Studies who specializes in European gas regulation.

The three sides are poised to resume talks this week on a replacement transit deal via Ukraine, because the existing one ends this year. There’s a lot at stake for all parties. Europe gets more than a third of its natural gas from Russia and has limited options to replace all the supplies, while Russia gets a huge chunk of its foreign income from the sales and Ukraine is heavily reliant on the payments it gets from shipping the fuel through its territory.

“The European Commission might think it’s got a stronger hand in negotiations, but I think that’s faulty logic,” said Yafimava by phone. “It lowers the chance of a long-term transit contract across Ukraine.”

How Russia supplied Europe last winter

Poland successfully challenged a 2016 European Commission decision that allowed Gazprom to use most of the capacity on the Opal pipeline, which carries Russian gas from the Nord Stream line to Germany. German regulator Bnetza followed up on the decision, enforcing its implementation, and said Gazprom’s shipments through Opal must be reduced to half the capacity. Shipments began slowing along the pipeline on Saturday.

Other analysts including Rystad Energy AS and BloombergNEF have said the decision might actually spur a deal as it limits Gazprom’s options. Russia will study the ruling, which “affects the overall situation with the energy supply of European countries,” Energy Minister Alexander Novak said Thursday.

Gazprom could even blame the decision for increasing the risk of supply shortages this winter, Yafimava said.

“The ruling adds pressure to Europe’s supply situation,” said Yafimava. “It was not expected and the timing was very bizarre, a little before the trilateral negotiations for the Russian-Ukraine agreement. Before the ruling, Gazprom would have the insurance that it would have this capacity and now it is not sure anymore.”

The U.S. and Poland are among nations seeking to hamper Nord Stream 2, a doubling of the capacity of the current link, which is meant to be finished this year but has faced issues with construction permits. Supplies from Russia via Ukraine’s gas grid may halt if an expiring transit deal isn’t replaced by the end of the year.

The latest court ruling moves Russia and Europe further away from each other and from a five-to-10 year Ukraine transit deal, because it further erodes what little goodwill was left, Yafimava said.

“It’s a big gamble. Nowhere is Gazprom obliged to book on a 10-year basis,” she said. “A long-term deal could have been done in exchange for removing obstacles for NS2, for instance, but the court decision on Opal makes it less likely.”