The world will face a starkly different America when President-elect Donald Trump takes the oath of office in January.
While the billionaire businessman's triumph was welcomed in some countries, others saw it as a big shock, as governments will now have to deal with a man who has cozied up to Russian President Vladimir Putin, told NATO allies they would have to pay for their own protection and vowed to make the Mexican government pay for a multibillion-dollar border wall.
Leaders weren't sure what to expect after a U.S. campaign in which Trump upended foreign policy orthodoxy on numerous fronts, including the international movement to contain the spread of nuclear weapons.
Putin sent Trump a congratulatory telegram Wednesday morning and made a televised statement expressing the hope that frayed U.S.-Russian relations could be put back on track. He said Moscow is ready to try to restore good relations.
"We aware that it is a difficult path, in view of the unfortunate degradation of relations between the Russian Federation and the United States," he said, adding that "it is not our fault that Russian-American relations are in such a state."
Russia was at times a focal point during the U.S. campaign, with government officials and the Hillary Clinton campaign team suggesting the Russian government was involved in hacking her campaign's emails. Trump expressed admiration for Putin and his tough leadership style, and some Clinton surrogates questioned Trump's business dealings with Russia.
Dmitri Drobnitski, a columnist at the popular, generally pro-Kremlin website LifeNews, said Trump's victory will help the entire world.
"I congratulate the American people with their will and with their democracy and with their strength and with their courage," he told The Associated Press. "So this is not only a victory for the Americans, who defended their democracy against the liberal, global elite— no, this is a victory that the American people brought to the whole world."
Trump's win 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. Financial analysts have predicted a Trump win would threaten billions of dollars in cross-border trade, and government officials say they have drawn up a contingency plan.
"It's DEFCON 2," Mexican analyst Alejandro Hope said. "Probably something as close to a national emergency as Mexico has faced in many decades."
Trump's electoral triumph is also being felt strongly in the volatile Middle East, where multiple crises are unfolding.
In Iran, leaders emphasized the need to keep the historic nuclear deal between Iran and world powers on track despite Trump's harsh criticism of it during the campaign.
Iran's president said Wednesday the deal "cannot be overturned by a single government."
Trump has suggested he would try to renegotiate the agreement under which Iran curbs its nuclear program in exchange for a gradual lifting of international sanctions.
In Israel, Prime Minister Benjamin Netanyahu hailed Trump as a "true friend of the State of Israel."
Netanyahu said that he believes the two leaders "will continue to strengthen the unique alliance between our two countries and bring it to ever greater heights."
Palestinian President Mahmoud Abbas said that he hopes "peace will be achieved" during Trump's term.
Iraqi Prime Minister Haider al-Abadi congratulated Trump. In a statement on his website, al-Abadi said he hopes the "world and the United States will continue to support Iraq in fighting terrorism."
The Taliban called for the withdrawal of all U.S. forces from Afghanistan once Trump takes office.
In a statement sent to The Associated Press, Taliban spokesman Zabihullah Mujahid said a Trump administration "should allow Afghans to become a free nation and have relationships with other countries based on non-interference in each other's affairs."
In Europe, NATO allies will wait to see if 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.
Trump's rhetoric has challenged the strategic underpinning of the NATO alliance, rattling its leaders at a time when Russia has been increasingly aggressive.
"As a candidate, Trump called into question NATO and trade agreements, and reached out to Moscow," said Daniela Schwarzer, an expert on trans-Atlantic relations at the German Council on Foreign Relations.
"His campaign of discrimination, lies and aggression harmed the principles of liberal democracy. Even if President Trump doesn't implement everything, Germany and Europe can't rely on the trans-Atlantic partnership as usual and have to stand up for Western values themselves."
Trump's victory pleased leaders of the nationalist Alternative for Germany party, which has campaigned strongly against Chancellor Angela Merkel's policy of letting hundreds of thousands of migrants into the country.
"It was high time that people disenfranchised by the political establishment get their voices back in the United States of America too," party co-leader Frauke Petry said.
The French populist, anti-immigrant politician Marine Le Pen congratulated Trump even before the final results were known, tweeting her support to the "American people, free!"
Trump's victory was viewed with shock in Ireland, a country fearful of Trump's campaign pledge to confront U.S. companies using Ireland as a tax shelter. Irish Times columnist Fintan O'Toole wrote Wednesday: "The republic of Washington, Jefferson, Lincoln and Roosevelt is now the United Hates of America."
In Asia, security issues and trade will top the agenda for the new administration, from North Korea and the South China Sea to the contentious and yet-unratified Trans-Pacific Partnership trade agreement.
China is seen as favoring Trump because he appears less willing to confront China's newly robust foreign policy, particularly in the South China Sea.
Clinton, by contrast, was disliked in Beijing for having steered the U.S. "pivot" to Asia aimed at strengthening U.S. engagement with the region, particularly in the military sphere.
Scholar Mei Xinyu wrote in the Communist Party newspaper Global Times that China would find it easier to cope with a Trump presidency.
"Trump has always insisted on abandoning ideological division and minimizing the risks that unnecessary conflicts with other countries may bring to the U.S.," Mei wrote.
News of Trump's victory hit hard in Cuba, which has spent the last two years negotiating normalization with the United States after more than 50 years of Cold War hostility. Trump has promised to roll back Obama's opening with Cuba unless President Raul Castro agrees to more political freedoms.
"If he reverses it, it hurts us," taxi driver Oriel Iglesias Garcia said. "You know tourism will go down."
Some said Trump's win might alter their life plans.
Muki Bosco, a hotel worker in South Sudan's capital, Juba, said it discouraged him from pursuing his dream of going to the United States.
"What Trump said about the immigration policy, saying that he would deport (immigrants). He was saying those things during the campaign ... I don't think I'll go to America."