Angela Merkel has been invited by Joe Biden to Washington next month, in a sign of the US president’s determination to repair a relationship that plummeted to a historic low during the Trump years.

Merkel becomes the first leader of a European country to be accorded the honour of an official invitation to meet Biden in the US since he became president in January, ahead of Emmanuel Macron and Boris Johnson. The two are also expected to hold a bilateral meeting during the G7 summit in Cornwall, which began on Friday.

The long-serving chancellor is stepping down later this year after 16 years in power, and this is likely to be her last big foreign trip before she quits the political stage. Merkel has largely eschewed visits to foreign countries since the start of the pandemic.

US-German ties came under enormous strain during the presidency of Donald Trump, who lambasted Berlin for its relatively low defence spending, its high current account surplus and its support for Russia’s controversial Nord Stream 2 gas pipeline across the Baltic Sea.

German officials say that the mood music has vastly improved since Biden became president, although Nord Stream 2 continues to be an irritant in the relationship. One of Biden’s first moves was to stop the withdrawal of US troops from Germany that Trump had ordered.

A spokesperson for the chancellery confirmed that Merkel would visit Washington on July 15 and said details of the programme would be released later.

A report in the newspaper Handelsblatt said she wanted to use the trip to resolve the dispute over Nord Stream 2, which will increase the volume of gas Russia can deliver directly to Germany, bypassing Ukraine.

Trump had said it would weaken Ukraine in its long-running confrontation with Russia and, by increasing Germany’s reliance on Russian gas, turn Europe’s largest economy into a “hostage” of the Kremlin.

Biden also opposes Nord Stream 2, calling it a “bad deal for Europe”. He is concerned that it could deprive Kyiv of lucrative gas transit fees, make it much more vulnerable to Kremlin pressure and increase Europe’s dependence on Russian energy imports.

But his administration has sought to draw the sting from the dispute, in the hope of improving its relationship with Germany. Last month, it waived sanctions on the company in charge of Nord Stream 2, while keeping them in place for the Russian ships laying the pipeline.

Handelsblatt said Merkel’s foreign policy adviser Jan Hecker recently met Jake Sullivan, Biden’s national security adviser, to look for ways of resolving the Nord Stream 2 conflict. Both sides described the meeting as constructive.

Hecker made a series of proposals to defuse the dispute, which will now be expanded on and form a basis for the meeting between Merkel and Biden.

Any solution will probably include German proposals for helping Ukraine to become a major exporter of hydrogen, using its existing network of gas pipelines. Germany sees hydrogen as a key plank of its strategy for reducing carbon emissions.