Shock reverberated throughout much of the world Wednesday after Donald Trump’s stunning upset victory over Hillary Clinton to become the next president of the United States.

Many international media outlets and pundits had taken their cues from American polls and predicted a Clinton win. But they awoke instead to news that left them feeling disbelief and, in some cases, dismay and even dread, especially among traditional U.S. allies and their mainstream politicians.

“The unthinkable – a nightmare – therefore becomes a reality: So on Jan. 20, the world’s biggest military and economic power will be helmed by a racist, erratic, isolationist president,” French news magazine Le Nouvel Obs wrote. “Europe wakes up wondering, stunned, if the big brother who protected her in 1945 will continue to defend her.”

Germany’s normally staid, center-right Frankfurter Allgemeine Zeitung, warned: “One thing is clear. The world must get ready for big changes, because the American election has injected an overdose of unpredictability into world politics.”

“That’s it, America has chosen a different path & we wake up to a different world,” tweeted Sarah Wollaston, a Conservative Party lawmaker in Britain.

Trump had bragged on the campaign trail that he would defy the pollsters just as the movement to withdraw Britain from the European Union had. British voters narrowly, and unexpectedly, went for “Brexit” in a referendum in June.

“2016 is…going to be the year of two great political revolutions,” said Nigel Farage, a leader of the campaign to leave the E.U. and a fan of Trump’s. “I thought Brexit was big, but boy, this looks like it’s going to be even bigger.”

Other far-right, ultra-nationalist figures in Europe welcomed Trump’s win, including anti-Muslim firebrand Geert Wilders in the Netherlands and Marine Le Pen, the leader of France’s National Front, who congratulated Trump and “the American people, [who are] free.”

Russian President Vladimir Putin, whom Trump says he admires, was among the first foreign leaders to send the new president-elect a congratulatory message. British Prime Minister Theresa May issued a statement praising the “special relationship” between the U.S. and Britain and pledging that the two nations would remain “strong and close partners on trade, security and defense.”

By contrast, French President Francois Hollande issued no quick statement after the election was called because he had not anticipated a Trump triumph and had no letter ready, according to RTL.

What kind of foreign policy Trump’s administration will pursue remains to be seen. But free-trade deals between the U.S. and Asian nations and between the U.S. and Europe are probably now doomed.

“While we will always put American’s interests first, we will deal fairly with everyone,” Trump said in his victory speech. “We will seek common ground, not hostility; partnership, not conflict.”

However, he had already railed against the North American Free Trade Agreement, assailed Mexican immigrants as rapists and pledged to build a wall along the U.S.-Mexico border and force the Mexican government to pay for it.

“The United States voted for the wall and Donald Trump’s lies,” proclaimed Mexican website El Economista, while the peso tumbled to a record low of 20.7818 pesos to the dollar before rallying slightly. Other Mexican news outlets adopted more cautious language.

Marcelo Rubens Paiva, a commentator for O Estado de S. Paulo, one of Brazil’s biggest papers, said the election result was an effort to “make America white again….The blonds return to power.” But, he added, “it’s not the end of the world….Want to bet that industry will continue in China and in Mexico?”

China’s official People’s Daily expressed hope that Trump would moderate his protectionist positions once in office and that the U.S. and China would end their relationship of “self-damaging competition.” But the Communist Party mouthpiece also took a dig at the American political system, saying that “the most dark, chaotic and negative [election campaign] in the past two centuries…has undeniably revealed the dark side of so-called democracy in the U.S.”

In the Middle East, the Abu Dhabi-based newspaper The National called Trump’s election “a profound shock that threatens tumultuous consequences for his country and the international system as a whole.”

In a measure of how surprising Trump’s win was, a Turkish tabloid had its own “Dewey Defeats Truman” moment, printing editions with “Clinton President” on its front page, over the sub-headline, “The polls didn’t lie.”

But the polls did mislead many in the U.S. and around the world, causing observers to shake their heads. “It happened,” commentator Beppe Severgnini wrote grimly in the Italian daily Corriere della Sera. “Bruce Springsteen’s nation danced in the dark and ended up in the arms of Donald Trump.”

Elsa Keslassy, Nick Vivarelli, John Hopewell and Patrick Frater contributed to this report.