Take a look at the beta version of dw.com. We're not done yet! Your opinion can help us make it better.
The controversial pipeline has long been opposed by Washington, but Chancellor Angela Merkel had made its completion a key policy goal before she leaves office in September.
The pact comes days after Chancellor Angela Merkel's last official visit to Washington prior to leaving office this September. Officials had talked up the chances of an accord during the visit, and during Joe Biden's tour of Europe in June.
The two countries agreed to support Ukraine and to sanction Russia if it tries to use energy supplies for gaining geopolitical leverage.
"The United States and Germany are united in their determination to hold Russia to account for its aggression and malign activities by imposing costs via sanctions and other tools," the statement read.
"Should Russia attempt to use energy as a weapon or commit further aggressive acts against Ukraine, Germany will take action at the national level and press for effective measures at the European level, including sanctions, to limit Russian export capabilities to Europe in the energy sector, including gas, and/or in other economically relevant sectors," it said.
The pipeline has long been opposed by the US, which argues Europe will become more dependent on Russian gas.
As part of the deal, Germany agreed to make investments into Ukraine and to actively ensure Moscow and Kyiv extend a gas transit agreement.
Additionally, Germany and the US would invest $1 billion (€0.85 billion) in a "Green Fund" to foster Ukrainian green-tech infrastructure, encompassing renewable energy and related industries, with the goal of improving Ukraine's energy independence.
"Germany will provide an initial donation to the fund of at least $175 million and will work toward extending its commitments in the coming budget years," the agreement stated.
German Foreign Minister Heiko Maas heralded the agreement as "constructive."
He said Germany was "back to pursuing our shared goals and convictions jointly with the United States with regard to Russia policy and energy policy."
"I am relieved that we found a constructive solution with the US on #NordStream2. We will support Ukraine in building a green energy sector & work to secure gas transit through Ukraine over the next decade," Maas tweeted.
It represents a shift in stance for the US, which has long been opposed to the pipeline that will pump gas from Russia's Arctic region to Germany under the Baltic Sea.
The United States worries that Russia could cut off energy supplies to Ukraine or other countries as a form of aggression more easily with the pipeline in place, as it will increase its capacity to export to the rest of Europe while cutting off "transit countries" nearer its borders.
"What we hear from Washington is that Joe Biden thinks that pushing back against Germany on this particular issue isn't really serving the United States' wider strategic interests in relation to Europe," said DW political correspondent Simon Young.
German lawmaker Roderich Kiesewetter told DW that the US "should trust" Berlin's commitment to imposing sanctions on Russia in the event that the country uses energy as a weapon.
"Germany has had a lot of interventions from France, from Poland, Ukraine and other countries who uttered their discontent with the German procedures regarding Nord Stream 2."
Joe Biden to meet Ukrainian president
Ukraine and Poland are both against the construction of the Nord Stream 2, which they fear will undermine European energy security and lead to lost revenues as transit countries for Russian gas.
The State Department denied reports that Ukraine had been warned against criticizing the agreement, noting one of its counselors was visiting both Kyiv and Warsaw this week to inform them of the deal.
The White House also announced on Wednesday that President Joe Biden would welcome Ukrainian President Volodymyr Zelenskyy to the White House on August 31.
"The visit will affirm the United States' unwavering support for Ukraine's sovereignty and territorial integrity in the face of Russia's ongoing aggression in the Donbas and Crimea, our close cooperation on energy security, and our backing for President Zelenskyy's efforts to tackle corruption and implement a reform agenda based on our shared democratic values,'' the White House said in a statement.
Chancellor Angela Merkel spoke on the phone with Vladimir Putin about Nord Stream 2 ahead of the deal's announcement, her office said on Wednesday.
Deputy spokesperson for the German government, Ulrike Demmer, said Merkel spoke about the implementation of the Minsk agreements for the peaceful resolution of the conflict in eastern Ukraine.
"Energy issues such as gas transit through Ukraine and the Nord Stream 2 pipeline were also topics of the conversation," she said.
In a statement released on Wednesday, the Russian government rejected the pipeline's negative associations, saying that it had never used energy a political weapon.
But the Kremlin also said, following the call between Merkel and Putin, that both leaders were "satisfied" with the near completion of Nord Stream 2.
Nord Stream 2 is nearly 98% complete and has cost more than €9 billion so far. It will roughly double the capacity of the existing Nord Stream pipeline, in operation since 2011, when building work on Nord Stream 2 began.
Crucially, this took place while Russia was still a G8 member (now the G7 once again) and prior to the annexation of Crimea and conflict in Ukraine.
Sanctions approved by Congress against the Swiss-registered firm behind the project, Nord Stream AG, and its CEO are expected to be waived as part of the accord.