BERLIN — The man whom Chancellor Angela Merkel calls “dear Barack” was back in Berlin on Saturday, his lanky figure and easy smile a reminder for Germans of a different era that ended not so long ago.
But former President Barack Obama had not come to speak about the past. He came to speak to the future: some 300 young leaders from across Europe, who had gathered for a town hall-style meeting in the German capital.
It did not take long for Mr. Obama to touch on one of his main concerns — and the reason he had come to what he called “the heart of Europe.”
Europe, Mr. Obama suggested, is one of the main battlefields between liberal democracy and far-right populism.
“Nationalism, particularly on the far right, is re-emerging,” he told a packed auditorium. “We know where that leads. Europe knows better than anyone where that leads.”
“It leads to conflict, bloodshed and catastrophe,” he said.
Mr. Obama did not mention his successor’s name. But the contrast with President Trump, issue by issue, was plain.
“I believe that climate change is an existential challenge for all of humanity,” Mr. Obama said. “I believe that creating tolerance and respect in our countries is vital,” he added. “I believe deeply in gender equality.”
In a two-hour exchange with his young audience, Mr. Obama frequently returned to the issue of racism and immigration.
“Immigration issues are driving a lot of the political turmoil here in Europe and in my own country,” Mr. Obama said.
But he also urged his audience to view those unsettled by the newcomers with empathy. “We can’t label everyone who is disturbed by migration as racist,” he said.
Mr. Obama has long been popular in Germany. Even before he was elected, in July 2008, 200,000 Berliners flocked to see him speak at the Victory Column in the heart of the city. For many, the affection has not abated.
“Our President,” gushed a front-page headline in the liberal newspaper Tagesspiegel, before listing the policies that had made Germans feel at ease with Mr. Obama: His support for multilateral institutions and his willingness to fight climate change and deal with Iran on freezing its nuclear program.
“Obama felt like a president for the Germans, as if he was made for them,” Tagesspiegel wrote. “The feeling has stayed. The contrast with Donald Trump has even reinforced it.”
In Germany, Mr. Trump’s presidency is increasingly seen as a challenge to America’s commitment to Europe and the values that underpin the Western alliance.
Three times more Germans trust President Vladimir V. Putin of Russia and President Xi Jinping of China to “do the right thing” than Mr. Trump, according to a survey by the Pew Research Center released last September.
Ms. Merkel, Germany’s first female chancellor, and Mr. Obama, America’s first black president, always had a special connection, their aides said. Outsiders in their own countries, they also often agreed on key political issues.
Mr. Trump and Ms. Merkel by contrast, clash both in style and on substance.
The meeting in Berlin comes after similar events in South Africa and smaller gatherings in places including Brazil and Indonesia hosted by the Obama Foundation and is central to Mr. Obama’s post-White House effort to “partner with the next generation” to solve the big problems of the day.
“It was a call to action for the next generation of European leaders and an effort to bring them together at a time when Europe’s social fabric is tearing apart,” said Julianne Smith, a former adviser in the Obama administration who is now a senior fellow at the Bosch Academy in Berlin.
The foundation’s approach differs from that of groups like the Clinton Foundation or the Bill and Melinda Gates Foundation, which seek to address specific issues. Some see in Mr. Obama’s approach a return to his roots as a community organizer — and that also is how many of the young activists, who gave him a standing ovation in Berlin on Saturday, described the ex-president.
“He was here as a former activist, he is a bringer of hope,” said Leonie Eland, a journalist from Germany who was among the 300 young leaders in the room. “He represents the other America, the progressive America and in a way the American dream.”