(Bloomberg) -- The U.S. has little leverage to prevent the Nord Stream 2 gas pipeline project between Russia and Germany from being completed, two senior administration officials said, acknowledging the failure of a years-long effort to head off what officials believe is a threat to European security.

One of the officials, who asked not to be identified discussing the administration’s take on the project, said the pipeline is nearly complete and sanctions passed Tuesday as part of a U.S. defense bill are too late to have any effect. The U.S. will instead try to impose costs on other Russian energy projects, the official added.

The admission is a rare concession on what had been a top foreign-policy priority for the Trump administration and highlights how European allies such as Germany have been impervious to American pressure to abandon the pipeline. It also shows how the U.S. has struggled to deter Russia from flexing its muscles on issues ranging from energy to Ukraine to election interference.

The administration is hoping to sharpen its focus on Russia when Deputy Secretary of State John Sullivan, who was confirmed as ambassador to the country last week, heads to Moscow next month. The post has been vacant since early October, when former envoy Jon Huntsman stepped down, and ties between the two countries have only continued to sour.

On a visit to Poland in February, Secretary of State Michael Pompeo said the Nord Stream 2 project “funnels money to Russians in ways that undermine European national security.”

Germany has rejected attempts to intercede in the project. “European energy policy must be decided in Europe, not the U.S.,” Foreign Minister Heiko Maas said in a statement on Dec. 12. “We fundamentally reject outside intervention and sanctions with extraterritorial effect.”

Trump has indicated that he’ll sign the legislation passed Tuesday. The penalties on companies building the project, led by Russian energy company Gazprom PJSC, would be effective immediately, according to a Senate Republican aide.

The measure targets vessels that lay the pipeline as well as executives from companies linked to those vessels, who could be denied visas and have transactions related to their U.S.-based property or interests blocked.

Nord Stream 2 will be in a position to be commissioned between April and June 2020, after additional connection work and testing, according to Bloomberg NEF.

--With assistance from Patrick Donahue and Daniel Flatley.

To contact the reporters on this story: Jennifer Jacobs in Washington at jjacobs68@bloomberg.net;Nick Wadhams in Washington at nwadhams@bloomberg.net

To contact the editors responsible for this story: Bill Faries at wfaries@bloomberg.net, ;Alex Wayne at awayne3@bloomberg.net, John Harney

©2019 Bloomberg L.P.