When Mr Jens Stoltenberg, who runs the North Atlantic Treaty Organisation, headed to Washington for meetings with United States President Donald Trump this week, he did not expect the experience to be pleasant.
After all, Mr Trump had publicly dismissed Nato, the US-led military alliance in Europe, as "obsolete".
Yet, Mr Stoltenberg's reception could not have been friendlier, and after an hour's meeting with the Nato secretary-general, Mr Trump simply ditched his previous opinions by telling journalists that the European alliance is "no longer obsolete".
Nor was this the only startling about-turn by the president.
Within the past few days, Mr Trump has also said that he is abandoning threats to brand China as a "currency manipulator", and he has dismissed expectations of improved relations with Russia with a remark that links with Moscow "may be at an all-time low".
... it's too early to say the new president now resembles a conventional American politician. To start with, he remains mercurial, and has a track record of agreeing with the last person he sees.
America's allies see such changes as evidence of an administration that is reverting to the traditional policies of its predecessors.
But although Mr Trump has clearly dumped pledges that were never going to work, he has yet to trace out his real foreign policy priorities.
Some of his more unusual foreign policy pledges were obviously designed just for the elections.
One such promise was to move the US embassy in Israel from Tel-Aviv to Jerusalem - something that other US presidential candidates over the past half-century have also promised, only to discover that the advantages are minimal, while the disadvantages remain huge. So, it disappeared without a trace.
Other Trump pledges were neutralised by early action from America's allies.
One example is the threat Mr Trump made that, once elected, he would demand bigger contributions from Japan and South Korea for providing them with security guarantees, or withdraw the US troops stationed on their soil.
Japanese Prime Minister Shinzo Abe's decision to meet Mr Trump within days of his election took the sting out of that threat by conceding that the new US leader had made his point.
But the electoral pledges that are being discarded now are those Mr Trump haphazardly picked up from opinions shared among fringe far-right American political circles over decades, without bothering to test their accuracy or implications.
These included the belief that Nato was just an old Cold War wheeze, that Russia is a potential ally in fighting terrorism, or that China's phenomenal economic rise was due simply to cheating and unfair competition.
Mr Trump is dumping these views because he is coming to terms with the realities.
Russia's behaviour in Syria is a rude reminder that "striking deals" with Moscow is easier said than done. The crisis in the Middle East confronted the US president with the fact that, as Mr Stoltenberg put it this week, "the US has no better allies than the Europeans".
And early high-level contacts with China highlighted to Mr Trump the sheer complexity of the US-Chinese relationship, as well as the futility of branding the country as a currency manipulator.
Confronting the realities became a faster process with the recent appointment of General Herbert McMaster as the new national security adviser. He has improved coordination with the other substantial Washington decision-makers: Defence Secretary James Mattis and Secretary of State Rex Tillerson.
Through a mixture of design and accident, the President has ended up with a strong foreign and security team, and this is starting to show.
Better still, the U-turn will not hurt the President's domestic credibility, for Mr Trump was elected largely because of his unconventional domestic pledges, rather than his foreign policy priorities.
Still, it's too early to say the new president now resembles a conventional American politician. To start with, he remains mercurial, and has a track record of agreeing with the last person he sees.
Mr Trump continues to demand greater burden-sharing from allies, as the Europeans will discover when he lands on their continent next month.
And then there is China, which is now being presented with awkward demands for a trade-off between economic concessions and security concessions over North Korea - not the sort of deal that Beijing cherishes or wishes to conclude.
Nor has Mr Trump discarded his instinctive belief that, if he does not like a particular situation, he can simply change it through unilateral action with no restraint.
In short, while the world might have witnessed this week the end of Donald Trump as the perennial political outsider, it has yet to become fully acquainted with Donald Trump the President.