Germany's parliament has passed an energy law that allows part of Russia's Nord Stream 2 pipeline project to skirt European rules that forbid one entity from the being both the producer and the supplier of natural gas.

It's one of the last hurdles to be overcome for the completion of the 1,225-kilometer underwater pipeline project owned by Russia's state-owned Gazprom company.

Last month, the project moved forward when Denmark approved construction of the pipeline in waters that are part of its economic zone, saving Gazprom from having to extend the pipeline to circumvent Danish jurisdiction.

Nord Stream 2 is to carry 55 billion cubic meters of gas annually to Germany, doubling the country's imports from Russia.

The company expects to complete the project in the coming months.

Russia has historically exported gas through Ukraine, which currently earns from $2 billion to $3 billion a year in transportation fees, a significant amount of money for its struggling economy.

But Moscow has sought to reroute European gas exports around Ukraine via offshore pipelines amid worsening relations with Kyiv, which is pushing for closer ties to the West.

The project has divided Europe, with critics saying it will increase Europe's dependence on Russian energy, boost the Kremlin's coffers for military adventures, and hurt Ukraine.

U.S. President Donald Trump has threatened to impose sanctions on the pipeline project, including companies helping with the project.

Based on reporting by Reuters, TASS, Interfax, and EU Observer