(Bloomberg) -- European Union negotiators agreed on new natural-gas rules that preserve a concession to Germany over its controversial plan to import more of the fuel from Russia.

Representatives of EU governments and the European Parliament approved a revision to gas-market legislation while scaling back hurdles for the planned Nord Stream 2 pipeline.

The deal late Tuesday in Strasbourg, France, keeps intact a French-German compromise proposal that last week helped break a deadlock among EU governments and opened the way for an accord with the 28-nation Parliament. The negotiations in Strasbourg lasted almost nine hours, ending just before midnight.

Nord Stream 2, a planned 1,200-kilometer (746-mile) undersea pipeline, has sparked a geopolitical battle within the EU and across the Atlantic. Eastern European countries wary of Russia have gained U.S. support in opposing the project, whose chief political champion in Europe has been German Chancellor Angela Merkel.

The critics have also picked up backing from the European Commission, the EU’s executive arm, which has said the bloc needs to become less dependent on Russian gas and which proposed the revised legislation in late 2017.

The Brussels-based commission said its proposal would end ambiguity over the European rules on gas-import infrastructure by making them explicitly cover all pipelines to and from the EU.

While the draft law builds on EU rules that prevent gas providers from controlling the transmission business and that require third-party access to pipelines, the French-German compromise being included in the final version of the new legislation creates loopholes for Nord Stream 2.

The French-German plan denies the regulatory authority in Denmark a decisive say over the project and puts that power primarily in the hands of German regulators, who could then seek and gain an exemption from the EU market-opening requirements as long as it didn’t hurt competition or supply.

Denmark has threatened to block the preferred route of Nord Stream 2, which is planned to start in Russia and make landing in Germany after crossing Danish waters.

Notwithstanding the dilution of its original proposal, the commission hailed the negotiated agreement among EU lawmakers.

“This is a major step forward in the creation of a truly integrated internal gas market,” EU Energy Commissioner Miguel Arias Canete said in an emailed statement afterward. “Europe has given itself a strong set of tools to deal effectively and collectively with our external energy suppliers.”

The deal reached on Tuesday is due to be scrutinized next week by national diplomats from the EU. Their sign-off would pave the way for final endorsements by EU governments and the 751-seat Parliament -- steps that are usually formalities after negotiated accords.

(Updates with EU commissioner’s comment in 11th paragraph.)

To contact the reporter on this story: Jonathan Stearns in Strasbourg, France at jstearns2@bloomberg.net

To contact the editors responsible for this story: Ben Sills at bsills@bloomberg.net, Jim Silver, Hari Govind

©2019 Bloomberg L.P.