LONDON — The world gasped in collective disbelief on Wednesday following the victory of Donald Trump in the U.S. presidential race, with apprehensive allies seeking to put a brave face on a result they had dreaded and American adversaries exulting in an outcome they see as a potential turning point in global affairs.
Within minutes of Trump's triumph, congratulatory messages poured in from leaders around the world, both friend and foe alike, even as security councils convened emergency meetings and dumbfounded diplomats struggled to understand the implications of Trump's win.
In a Moscow ceremony to welcome new ambassadors, Russian President Vladimir Putin referenced Trump's call for warmer ties and said “Russia is ready and willing to restore full-fledged relations with the United States.” News of the Republican’s victory was greeted with broad smiles and a round of applause in the lower house of the Russian parliament.
[Live updates from 2016 election and reactions]
U.S. allies insisted that they would work closely with the new administration even as they tried to absorb the outcome.

In China, Russia and Israel we ask people what they think of the election of Donald J. Trump as the 45th president of the United States. We’ll update this video as more voices come in. (Jason Aldag/The Washington Post)
In Britain — where the Parliament earlier this year debated banning Trump from even visiting — Prime Minister Theresa May said her nation and the United States had “an enduring and special relationship based on the values of freedom, democracy and enterprise.”
Turkish President Reçep Tayyip Erdogan, who had criticized Trump during the presidential campaign for showing intolerance toward Muslims, said that Trump’s victory was a “positive sign” and the “beginning of a new era in the United States.”
But beneath the assurances of business-as-usual, and even optimism in some quarters, was a deep anxiety that Trump's win could fundamentally unsettle the global order.
The terms “shock” and “nightmare,” which were trending on Twitter in Germany, appeared to reflect the sentiment among many observers and politicians in Berlin.
German Defense Minister Ursula von der Leyen called Trump's victory a “severe shock.” She told public TV network ARD: “I think Donald Trump also knows that this wasn't a vote for him, but that it was much more a vote against Washington, against the establishment.”
[Donald Trump wins the presidency in stunning upset over Clinton]
Concerns were also sharp in Brussels, the headquarters of NATO and the European Union, where Trump had been universally opposed, as well as among key Asian strategic allies such as Japan and South Korea. But China’s state media chortled at how the elections revealed the decline of American democracy.
“The probably most divisive and scandalous election in American history has eroded voters' faith in the two-party system, as many voters called it a game of money, power, and influence,” wrote state-run news agency Xinhua.
Nowhere was the result felt more keenly than in Mexico, as the peso crumbled. As the U.S. election unfolded, a thunderstorm rumbled in Mexico City.
“It feels like our nightmare is here,” tweeted Jorge Guajardo, who was Mexico’s ambassador to China from 2007 to 2013.
Trump’s disdain for Mexican immigrants and his pledges to build a wall along the Mexican border and renegotiate the North American Free Trade Agreement have made him a figure of hate for many Mexicans.
“Mexico will have a very big problem having good relations with him,” said Raul Benitez Manuat, a professor at Mexico’s National Autonomous University. “Mexicans are very nationalistic, and they feel aggrieved by Trump.”
[Markets staggered by Trump’s shock victory but stage partial recovery]
Trump's victory was also deeply concerning to the governments in Japan and South Korea, Washington’s two closest allies in Asia. On the campaign trail, Trump had repeatedly pledged to upend the American military pacts with both countries, saying neither was paying enough for their defense against a nuclear-armed North Korea and a strengthening China.
In Tokyo, financial authorities called an urgent meeting to discuss a fall in the country’s stock market in response to Trump’s strong showing. Prime Minister Shinzo Abe later congratulated Trump on his victory. “Japan and the U.S. are unshakable allies that are firmly tied with universal values such as freedom, democracy, basic human rights and a rule of law,” Abe said in a statement. “I’d like join together with President-elect Trump and work with him on the issues facing the world.”
In Seoul, the presidential office convened an emergency session of its national security council to discuss the election results. The government later released a statement promising that South Korea “will continue to closely cooperate with the next U.S. administration for the peace and prosperity in the Korean Peninsula.”
A Trump victory could heighten tensions between North and South Korea. “The current situation seems like the beginning of the U.S.’s decline and a beginning of the failure of democracy,” said Hasung Jang, a professor of finance at Korea University in Seoul.
Jang also forecast an economic fallout.
“Trump is a protectionist in trade,” said Jang. “Trump’s victory will be a very negative change for South Korea because we have an export-oriented economy. There’s a possibility South Korea will become geopolitically closer to China.”
But others suggested that Trump may not follow through on his rhetoric.
In China, the U.S. ambassador, Max Baucus, argued that the “world’s most important relationship” would remain stable, and he played down Trump’s threat to impose a 45 percent tariff on Chinese goods.
“People say a lot of things in the heat of a campaign that are not quite as feasible as they think when they are elected,” he said.
Other nations that have had rocky relationships with the Obama administration expressed hope for a new beginning.
Egyptian President Abdel Fatah al-Sissi, whose record of imprisoning opponents and restricting free speech has earned him condemnation from human rights groups, said he “looks forward to the presidency of President Donald Trump to inject a new spirit into the trajectory of Egyptian-American relations.”
In a later statement, Sissi's office said the Egyptian president was the first world leader to reach Trump by phone and personally congratulate him.
In Europe, there was never any secret about the continent’s overwhelming preference before the vote. Among major U.S. allies across the Atlantic, leaders spoke openly of their contempt for Trump and their fear of the consequences should he be elected.
Diplomats fretted about the consequences for NATO, which was the target of sharp rhetoric from Trump during the campaign as he questioned the priorities of the military alliance. While the Obama administration has committed a battalion of troops to Eastern Europe to deter a resurgent Russia, Trump has proposed a radically different approach to the Kremlin.
Senior U.S. diplomats moved quickly to assure European partners that nothing would change. But many in the NATO fold were clearly shocked at the results.
“There is a lot of continuity here no matter who wins later this morning,” U.S. Ambassador to NATO Douglas Lute told a mostly European crowd of diplomats and politicians watching the results come in. “NATO has always been a bipartisan venture for the United States.”
European politicians said they would seek to maintain the strongest possible ties with the United States.
Leaders who just a day ago were openly criticizing Trump moved to play nice, recognizing that they had no choice but to work with the new American leader.
“It wasn’t what we were expecting,” said David McAllister, a German lawmaker who is the head of the European Parliament’s delegation to the United States. “We Europeans need the Americans to guarantee our security, and we have a huge interest in transatlantic relations.”
Some Europeans even tried to find commonalities between Trump's message and their own.
“I’m looking forward to meeting President-elect Trump, to sit down with him and discuss the way forward,” said NATO Secretary General Jens Stoltenberg, who had repeatedly said that NATO decision-making was not being influenced by Trump’s sharply critical approach to the alliance. In reaction to Trump’s calls for more cooperation with the Kremlin, Stoltenberg said that “for NATO there is no contradiction between political dialogue with Russia and strong deterrence and defense.”
Amid the gritted-teeth statements of mainstream European leaders, there was also cheering from the continent's far right. Britain voted to leave the European Union over the summer, and far-right parties are surging in France and Germany.
“The people are taking their country back. So will we,” wrote Geert Wilders, the leader of a Dutch Euroskeptic party who has pushed for hard barriers against immigration.
In France, Marie Le Pen, the outspoken leader of France’s far-right National Front party, did not wait for the results to be announced before tweeting:“Congratulations to new president of the United States Donald Trump and to the American people, free!”
Trump’s win was immediately seen as possible harbinger of a far-right victory in France's upcoming 2017 presidential election, which analysts now say could represent a third chapter in a string of stunning populist upheavals.
“It’s a divine surprise for the National Front,” said Dominique Moïsi, a co-founder of the French Institute for International Relations. “Suddenly the possibility that after Brexit and after Trump there could be Marine Le Pen is striking the French.”
Florian Philippot, Le Pen’s most senior strategist, tweeted: “Their world is collapsing. Ours is being built.”
To many in Britain, Trump's victory was stunning — but also familiar, coming as it did less than five months after the country voted to leave the European Union.
“Trump said himself that his election would be 'Brexit plus plus' and he was right,” said Thomas Roulet, a management professor at King's College London. “The result is as surprising as the Brexit one and same as for Brexit the vote for Trump is a vote against the establishment.”
The Israeli right quickly seized upon the Trump victory. Jerusalem Mayor Nir Barkat cheered “mazal tov, Mr. President!” and then reminded Trump that he had promised to move the U.S. Embassy from Tel Aviv to Jerusalem. The United States does not recognize Jerusalem as Israel’s capital, awaiting instead a final resolution of a negotiated settlements between Israel and the Palestinians.
The leader of Israel’s Jewish Home party, the education minister Naftali Bennett, said that Trump’s win “is an opportunity to immediately retract the notion of a Palestinian state in the center of the country, which would hurt our security and just cause.”
“The era of the Palestinian state is over,” Bennett said.
From the Palestinian side, a leader of the Palestine Liberation Organization, Saeb Erekat, reminded Trump that two-state solution to the conflict here had been a policy of all previous U.S. administrations, Republican and Democrat.
In India, supporters of Hindu nationalist Prime Minister Narendra Modi took delight in the collective failure of liberal intellectuals, the media and pollsters to predict the outcome or gauge the public mood.
“Fearmongering has begun. Recall dire predictions of riots and plague if Modi won 2014 race? Libbies are such sore losers,”tweeted political analyst Kanchan Gupta.
In the Philippines, the mood was somber at the U.S. Embassy’s election party in Manila, with a crowd of Filipino Americans and students eager to study in the United States expressing fear, shock and disappointment.
“The U.S. is known as a country for immigrants, as the land of the free, but he wants to build a wall,” said Carlos Llamas, a 19-year-old college junior studying consular and diplomatic affairs. “As president you are chief diplomat for your country, but he doesn’t act like that.”
Classmate Bria Tamayao, 18, wondered how two men known for posturing and tough talk — Trump and Philippine President Rodrigo Duterte — could work together.
“I don’t know what will happen to the Philippines and the United States,” she said. “This kind of unpredictable behavior is not good for the world.”
In Iraq, Kurdish and Iraqi forces are more than three weeks into their battle against Islamic State militants in the northern city of Mosul, an operation heavily reliant on the military support of the United States, and the prospect of a Trump presidency has caused some nervousness.
But it has also generated hopes of a firmer hand. Maj. Gen. Najim Jabouri, a top Iraqi military commander for the Mosul operation, said he believes that Trump will be “tougher” on the militant group, also known as ISIS, than Clinton would have been.
“ISIS don’t need a soft hand,” he said. “He will fight them more strongly than we have before. We need a strong hand to destroy them.”
On another war front, Afghan President Ashraf Ghani and Chief Executive Abdullah Abdullah issued statements congratulating Trump, who will face decisions over U.S. military units aiding in the fight about the Taliban and other militant factions.
Ghani noted that the U.S. government is “an essential and important strategic partner” in Afghanistan’s development and fight against terrorism.”
Denyer reported from Beijing. Joshua Partlow in Mexico City, Michael Birnbaum in Brussels, Loveday Morris in Irbil, Iraq, Erin Cunningham in Istanbul, Emily Rauhala in Manila, Rama Lakshmi in New Delhi, Yuki Oda in Tokyo, Yoonjung Seo in Seoul, and Congcong Zhang, Luna Lin and Jin Xin in Beijing, Stephanie Kirchner in Berlin, Sudarsan Raghavan in Cairo, Pamela Constable in Kabul, William Booth in Irbil, Iraq, and Louisa Loveluck in Beirut contributed to this report.