MOSCOW — World leaders struggled Wednesday to come to grips with a new reality – Donald Trump will be the next U.S. president – and an as yet unanswerable question: How many of his campaign pledges will he actually act on?

The remarkable triumph of the politically untested businessman was welcomed in some countries, such as Russia, while in others it was a major shock.

When Trump takes office in January, world leaders will confront a man whose stated views represent a sharp break with U.S. foreign policy orthodoxy. He has cozied up to Russian President Vladimir Putin, warned stunned NATO allies that they will have to pay for their own protection, floated a ban on Muslims entering the U.S. and vowed to make the Mexican government finance a multibillion-dollar border wall.

Trump’s victory was hailed in Russia, which has taken an increasingly aggressive stance toward the West in recent months. Putin sent Trump a congratulatory telegram Wednesday and made a televised statement expressing the hope that frayed U.S.-Russian relations could be put back on track.

“We are aware that it is a difficult path, in view of the unfortunate degradation of relations between the Russian Federation and the United States,” the Russian leader said.

Russia became a focal point during the presidential campaign, with government officials and Hillary Clinton supporters suggesting that Moscow was involved in hacking her campaign’s emails.

There is anxiety in Europe among NATO allies who are waiting to see whether Trump follows through on suggestions that the U.S. will look at whether they have paid their proper share in considering whether to come to their defense.

That rhetoric has challenged the strategic underpinning of the NATO alliance – in which an attack on one NATO nation is considered an attack on all – at a time when Russia has been ever more confrontational.

Trump’s win also caused trepidation in Mexico, where his remarks calling Mexican immigrants criminals and “rapists” were a deep insult to national pride.

Trump has suggested slapping a 35 percent tax on automobiles and auto parts made by U.S. companies in Mexico, and financial analysts have predicted a Trump win will threaten billions of dollars in cross-border trade.

Trump’s victory is “as close to a national emergency as Mexico has faced in many decades,” Mexican analyst Alejandro Hope said.

It also caused concern in Cuba, over Trump’s threat to roll back President Barack Obama’s normalization of relations unless Cuban President Raul Castro agrees to more political freedoms.

Trump’s electoral triumph was also felt strongly in the volatile Middle East, where multiple crises are unfolding. One major concern is Trump’s vehement opposition to the historic nuclear agreement between Iran and world powers under which Iran has curbed its nuclear program in exchange for a gradual lifting of international sanctions.