Denmark on Wednesday said it has granted its approval for the Nord Stream 2 gas pipeline from Russia to Germany to pass through its territory, irrespective criticism from the U.S. President Donald Trump’s administration, which had opposed the project.

Nord Stream 2, a 1,200 kilometers gas pipline from Russia’s state-controlled energy gaint Gazprom to Germany through the Baltic Sea. The decision by the Danish Energy Agency  is a victory for the governments of Russia and Germany, which has been condemned by several European countries.

The Danish government agency said it had granted a permit “to construct a section of the Nord Stream 2 natural gas pipelines on the Danish continental shelf southeast of Bornholm in the Baltic Sea.”

“We are pleased to have obtained Denmark’s consent,” said Samira Kiefer Andersson, a representative for Nord Stream 2 AG, the company that manages the project. “We will continue the constructive cooperation with Danish authorities to complete the construction of the pipeline.”

Russian President Vladimir Putin hailed the move, saying it reflected Denmark’s respect for its European partners.

“Denmark has shown itself to be a responsible international partner, protecting its interests and its sovereignty, as well as interests of its main partners in Europe, which are strongly interested in the diversification of supplies of Russian hydrocarbon resources to the European market,” Putin said at a news conference following his talks in Budapest with Hungarian Prime Minister Viktor Orban.

Konstantin Kosachev, head of the foreign affairs committee in the upper house of the Russian parliament, noted that the permission was issued despite the “powerful pressure” of the project’s foes “from Ukraine to Poland to America.”

A refusal to allow the pipeline’s construction would have “inflicted serious losses to European companies without any real reason,” Kosachev wrote on Facebook.

While the pipeline is wholly owned by Russian gas giant Gazprom, half of the project’s 8 billion-euro ($8.9 billion) cost is covered by five European energy and chemicals companies including Shell, BASF and ENGIE.

Gazprom CEO Alexei Miller said Wednesday it would take only five weeks to build the pipeline section on the Danish shelf.

Germany, Europe’s biggest economy and the world’s biggest importer of natural gas, already relies heavily on Russian gas. So far, Chancellor Angela Merkel has deftly kept the pipeline off the table while imposing sanctions against Russia for its actions in Ukraine.

Asked whether any political obstacles to the project remain after the Danish decision, German government spokesman Steffen Seibert said: “We have always said that there is a political dimension to Nord Stream 2, and we have always said that gas transit through Ukraine must have a future.”

Seibert noted that Merkel discussed the issue with Russian President Vladimir Putin two days ago, and said Germany continues to support three-way talks between Russia, Ukraine and the European Commission on gas transit.

In Denmark, a left-wing party that supports the minority Social Democratic Party government said the decision was “disastrous for the climate and the European energy policy.”

“In light of the climate crisis, Nord Stream 2 is a blatantly stupid decision,” said Mai Villadsen, a member of the Red-Green Alliance. “It makes no sense to approve a huge new gas pipeline without assessing the consequences for the climate.”

The Nord Stream 2 pipeline starts in Russia and passes through Finnish, Swedish, Danish and German marine areas before going ashore at the German coast. It can transport 55 billion cubic meters of natural gas per year.