German Chancellor Angela Merkel congratulated President-elect Donald Trump on his victory and offered to work closely with him on the basis of "democratic values" including respecting people's dignity regardless of their origin or religion. (Reuters)

When is a welcome also a warning? When it’s a congratulatory message from German Chancellor Angela Merkel to President-elect Donald Trump.

In fairness, the American started it — jabbing at the German leader on the campaign trail for her open-door (now largely closed) policy toward refugees fleeing war in the Middle East.

“What Merkel did to Germany is a shame, it’s a sad, sad shame,” he said in March. He later described her as a “really great world leader” before adding, “but I was very disappointed in this move with the whole immigration thing.”

Merkel has guided Germany to the zenith of its post-World War II power, becoming the “decider” of Europe. There is no question that, at some point, she and Trump will need to forge something of a working relationship. And Merkel is nothing if not pragmatic.

Yet her elegantly crafted message to Trump on Wednesday to mark his surprise triumph reads like more of a cautionary note. The key passage: “Germany’s ties with the United States of America are deeper than with any country outside of the European Union.

"Germany and America are bound by common values — democracy, freedom, as well as respect for the rule of law and the dignity of each and every person, regardless of their origin, skin color, creed, gender, sexual orientation, or political views. It is based on these values that I wish to offer close cooperation, both with me personally and between our countries’ governments.”

Her deputy chancellor, Sigmar Gabriel, was far more blunt: “Trump is the trailblazer of a new authoritarian and chauvinist international movement. … They want a rollback to the bad old times in which women belonged by the stove or in bed, gays in jail and unions at best at the side table. And he who doesn’t keep his mouth shut gets publicly bashed.”

To be fair, the Germans seem rather selective about whom they call out for poor taste and intolerance. Last week, Merkel's government stood by its E.U. commissioner, Gunther Oettinger, after he delivered a speech described by some as racist — he called the Chinese “slanty-eyed” — as well as homophobic. But a government spokesman, presumably with Merkel’s blessing, backed him by saying, “Everyone has their own language and speaking style.”

Here’s the full text of Merkel’s letter to Trump:

“Please accept my congratulations on your election as President of the United States of America.

You will assume office at a time in which our countries are jointly facing many different challenges.

Germany’s ties with the United States of America are deeper than with any country outside of the European Union. Germany and America are bound by common values — democracy, freedom, as well as respect for the rule of law and the dignity of each and every person, regardless of their origin, skin color, creed, gender, sexual orientation, or political views. It is based on these values that I wish to offer close cooperation, both with me personally and between our countries’ governments.

Partnership with the United States is and will remain a keystone of German foreign policy, especially so that we can tackle the great challenges of our time: striving for economic and social well-being, working to develop far-sighted climate policy, pursuing the fight against terrorism, poverty, hunger, and disease, as well as protecting peace and freedom in the world.

In the years ahead as president, I wish you a sure hand, every success, and God’s blessing.”

Read more:

After Trump’s victory, the world is left to wonder: What happened to America?

Europe’s anti-immigrant leaders are taking Trump’s show on the road