Reaching over to touch Scholz's arm as they sat at the start of a G7 meeting in the Bavarian Alps, Biden said it was "in no small part because of you" that the West had stuck together against Russia four months after the invasion of Ukraine.

The two men, who are from different political generations but both took office last year, have made common cause over Ukraine as they sought to heal ties that were sorely strained under Biden's predecessor Donald Trump.

Both leaders have vowed to strengthen Ukraine's armed forces, increase sanctions pressure on Moscow and counter surging food and energy prices that have undermined their popularity at home and tested their own domestic alliances.

At Sunday's meeting, Biden pushed back against criticism of Scholz's leadership, praising the chancellor for marshalling Europe's response to Russian President Vladimir Putin's invasion of Ukraine.

"They are kindred spirits and they're dealing with some of the same challenges," said Steven Sokol, president of the American Council on Germany. "I could easily imagine there's a bit of a bromance going on," he said.

While privately expressing reservations about some other leaders, the 64-year-old Scholz speaks especially warmly of the U.S. president and sees the transatlantic relationship as a crucial pillar of German and European security.

He "has always looked very much to the USA," according to one long-time friend and confidante.

The Social Democrat Scholz also values what he sees as Biden's commitment to fighting for those left behind by globalisation and technological advances, a theme Scholz explored at length in his book "Land of Hope" in 2017.

KEEPING PROMISES

For his part, Biden, 79, has lauded Germany for agreeing to boost its military spending by 100 million euros over the next decade, and overcoming resistance stemming from World War Two on providing weapons to Ukraine.

Berlin's support for repeated rounds of sanctions against Russia, often against its own economic interests, has impressed U.S. officials who had braced for a more halting embrace.

Germany was "one of the countries where we wanted to really restore and rebuild the trust and the solidarity in that relationship and I think we've really been able to achieve that," a senior U.S. administration official said.

"The warm and friendly words between the two, the president's expression of trust in Scholz showed that we've been able to make progress on that goal, and achieve a lot of that close working relationship that we wanted."

Biden's administration has also welcomed Scholz's rapid and unprompted decision to halt the Russian-led Nord Stream 2 pipeline, said one source familiar with the matter.

"Scholz had promised the president that if Russia further invaded Ukraine, the pipeline would be shut down," the source said. "He did exactly what he said he would do, and that was deeply appreciated."

The Trump years contrasted to the warm relationship that Scholz's predecessor Angela Merkel forged with Barack Obama after initial friction from disclosures that the National Security Agency had tapped Merkel's mobile phone.

Trump's public and private pummeling of Berlin over the pipeline, its failure to raise military spending to meet NATO targets and its support of the Iran nuclear deal sent the partnership reeling.

Biden first met Scholz in Rome at the Group of 20 meeting in October, shortly before the German leader took office.

"Relations between the two administrations are unusually close", said one German government source. "In fact - the higher you get in the hierarchy in Washington, the closer relations are to German government."

There have been differences, to be sure, including lingering frustration in Berlin and other European capitals over the U.S. withdrawal from Afghanistan last August, a move seen as a "big mistake" that may have even encouraged Putin, according to German government sources.

Some in Washington meanwhile question Germany's continued strong economic ties with China, echoing criticisms under Trump.

But on Sunday, Scholz was all smiles after Biden's warm words: "It's a good message that we all managed to stay united, which, obviously, Putin never expected."

(Reporting by Andrea Shalal and Andreas Rinke; editing by Matthias Williams and Raissa Kasolowsky)

By Andrea Shalal and Andreas Rinke