A worker stands in front of pipes which lie stacked at the Nord Stream 2 facility | Photo by Carsten Koall via Getty Images Nord Stream 2: Who fared best The EU revamp of its Gas Directive ends up as a classic European fudge.

Every winner is also a loser when it comes to Nord Stream 2.

EU officials agreed late Tuesday night to amend the bloc's Gas Directive so that its rules cover gas pipelines from third countries. The measure is aimed at the Russian-backed Nord Stream 2 pipeline, now under construction, that would carry gas from Russia to Germany under the Baltic Sea.

It took, unusually, only one round of negotiations between the European Parliament, Council and Commission to reach a compromise on an issue that has divided EU countries for years.

It's a mixed result all around, angering pipeline opponents who'd wanted to kill it off, but also dismaying the project's backers who had hoped to leave it unencumbered by EU regulations.

The one clear winner is Romania, current holder of the EU's rotating Council presidency. Despite the enormous political tensions around the pipeline, it managed to conclude work on the directive just weeks after taking over the presidency in January.

POLITICO took a look at the winners and losers (in large measure the same parties).

Germany

For Berlin, this was an exercise in damage limitation.

Germany, a strong supporter of Nord Stream 2, fought hard to block the Gas Directive in the Council, trying to assemble a blocking minority of countries.

It also used its diplomatic muscle last year to stall work on the file thanks to cooperation from the two previous Russia-friendly Council presidencies, Austria and Bulgaria.

But Berlin couldn't kill the directive revamp outright, despite frantic phone calls to the Romanian presidency during Tuesday's talks.

Through a last-minute compromise with France in the Council last week, Berlin managed to push through language that gives German regulators the power to decide whether to ask for an exemption from EU rules. A previous text would have given Denmark a decisive voice on the matter as well since the pipeline's current route also runs through its waters.

But the final decision rests with Brussels.

“The Commission will take the binding decision on whether to grant the exemption,” the Parliament said in a press release. “If the member state’s assessment differs from that of the Commission, it is the Commission’s assessment which prevails.”

That’s clearly not the outcome Germany favors — but it might not be so bad in the end.

Any decision by Brussels depends on the makeup of the next Commission, and whether the future energy and competition commissioners lean toward Berlin's views.

The European Commission

The Commission managed to extend its regulatory authority to cover projects that used to be outside its remit, so that's a win.

Energy Commissioner Miguel Arias Cañete said: “Europe is closing a loophole in the EU legal framework."

But Brussels is upset about the spin that followed the agreement.

“I’ve seen this agreement being projected as a Franco-German big deal,” Margaritis Schinas, the Commission's spokesman, said Wednesday. “May I respectfully remind everybody that this was a Commission proposal … We have paternity rights on this agreement and we want this to be known.”

Once any applause dies down, the Commission is left with a tough problem: whether to pay the political price of confronting Germany over any Nord Stream 2 exemption request.

It's been there before. In 2013, the Commission got a request from Germany over the OPAL pipeline — the onshore leg of the existing Nord Stream 1 line — asking for an exemption allowing Gazprom to use the pipeline's full capacity. Brussels hemmed and hawed, and in 2016 came back with a modified proposal that, in essence, gave Gazprom almost full access to the line.

Parliament and Council still need to formally approve the deal and countries would then have nine months to adopt it into their laws.

Russia

The decision isn't something Moscow wanted. Gazprom, backed by the Kremlin, built its entire Nord Stream 2 business case on the premise that the construction and operation of the pipeline would follow the same course of its sister Nord Stream 1 line, which isn't covered by EU gas rules.

Subjecting Nord Stream 2 to the EU’s gas rules could cause delays and hurt Gazprom’s bottom line.

The good news for Russia is that the construction of Nord Stream 2 is not affected; Gazprom said it wants to put it into operation “before late 2019.”

Russia and Germany could also negotiate an intergovernmental agreement on the matter, which the Commission would have to approve. Alternatively, Gazprom could simply decide to abide by EU rules, which won't allow Gazprom to both ship gas through the pipeline and own the infrastructure.

Poland

Warsaw has been Nord Stream 2’s most vocal critic. It fears Moscow will use gas deliveries as a geopolitical weapon by being able to cut off gas to Eastern Europe while continuing to supply Germany. It also wants to be a gas hub in its own right by importing liquified natural gas and eventually building a pipeline to connect to Norway's North Sea.

But Poland's efforts failed. Bringing Nord Stream 2 under EU rules is Warsaw’s second best outcome.

“Many wanted to see these negotiations fail as, without this agreement, EU rules would not be applicable to gas pipelines from non-EU countries,” said Jerzy Buzek, the chair of the Parliament’s energy committee and a former Polish prime minister.

Ukraine

Ukraine has strongly objected to the project. Until now it has been the main conduit for Russian gas heading west, which also earns the cash-strapped country crucial transit fees.

Ukraine, Russia and the Commission are in talks on future gas transit once Ukraine's current agreement with Gazprom expires at the end of this year.

Moscow has wobbled over how much gas it plans to send across Ukraine in the future, as the two Nord Stream pipelines would ship 110 billion cubic meters of gas a year, accounting for a large share of the EU's current imports.

The good news for Kiev is that the fuss over the pipeline forced Germany to commit to defending continued gas transit across Ukraine. That point was underscored in last week's Franco-German agreement, which described their compromise over the Gas Directive as “indispensable for a fruitful discussion on the future gas transit through Ukraine.”

The bad news is that Ukraine is fully dependent on the trustworthiness of those countries in sticking with that commitment.