BERLIN — The contrast could not have been more stark.

Chancellor Angela Merkel of Germany started Thursday in Berlin with the 44th president — the one she has called “dear Barack.” She spent the afternoon in Brussels with the 45th, Donald J. Trump, whose election she greeted with a stern reminder to respect shared values like equality and freedom.

Mr. Obama was in Berlin to help celebrate 500 years since Martin Luther’s Reformation, and received a rock-star welcome from tens of thousands at the Brandenburg Gate. It was all bonhomie, waves and warm words, as the former president praised Ms. Merkel’s “outstanding work, not just here but around the world,” particularly with refugees.

Barely two hours later, Ms. Merkel was among the European leaders who greeted Mr. Trump coolly at NATO headquarters in Brussels, where few casual words, let alone warm ones, were exchanged, as the new American president once again castigated allies for not paying their fair share of bills.

For Europeans, the juxtaposition served as an unavoidable reminder of the contrasts between the men — their personal styles, their relations with America’s allies and the values and priorities they embody.