Angela Merkel was lavished with praise by Barack Obama just hours before she met his successor Donald Trump on Thursday.
The German Chancellor, who enjoys a contrasting relationship with the two men, squeezed in the company of both US presidents in one day.
In a warm encounter in Berlin, Mrs Merkel greeted Mr Obama as the pair took part in a panel discussion on democracy.
With less than four months before Germany’s election, in which Mrs Merkel hopes to prolong her 11-year spell as Chancellor, Mr Obama hailed her “outstanding work” in the country and around the world.
In his first public event with a foreign leader since leaving office, the former US leader described Mrs Merkel as “one of my favourite partners throughout my presidency”.
The pair exchanged smiles and laughter during their hour-and-a-half appearance in front of the 70,000 people gathered by the Brandenburg Gate, who cheered the former president.
Mr Obama’s last phone call before leaving the White House in January this year was with Mrs Merkel.
Many viewed the act as Mr Obama passing on the baton of international leadership to the German leader, as Mr Trump prepared to pursue his ‘America First’ doctrine
The current occupant of the White House was the thinly veiled target of Mr Obama’s remarks on Thursday.
In an apparent reference to one of Mr Trump’s flagship campaign promises, Mr Obama told the crowd: “We can’t isolate ourselves. We can’t hide behind a wall.”
Following a change of outfit, Mrs Merkel then travelled to Brussels for a NATO summit with other Western leaders.
It was another chance for her to meet with Mr Trump, as the US president and Mrs Merkel look to move beyond a frosty opening to their relationship.
Perhaps aware of the sensitivities of her meeting with Mr Obama earlier in the day, Mrs Merkel was said to have previously made sure Mr Trump knew the Berlin event had been scheduled before the date of the NATO summit was set.
Prior to his inauguration, Mr Trump had described Mrs Merkel’s offer for Syrian refugees to settle in Germany during Europe’s migrant crisis as “catastrophic”.
He also attacked the EU as a “vehicle” for Germany.
Mrs Merkel herself had greeted Mr Trump’s election to the White House with a warning over the terms of her co-operation with his administration, having admitted she watched the results of the US election with “trepidation”.
The pair met for the first time in March, although their talks in the White House were notable for Mr Trump’s awkward apparent snub of the traditional handshake in the Oval Office.
The US president is set to make his first official visit to Germany for a G20 summit in July.