KOTOR, Montenegro — Just over an hour after Donald J. Trump secured his stunning triumph, President Vladimir V. Putin of Russia congratulated the victor and looked forward to “constructive dialogue.” China’s president, Xi Jinping, waited a little longer, sending Mr. Trump a similarly measured message of hope and appealing for “cooperation for mutual gain.”
But perhaps even more revealing was Momcilo Krivokapic, a bearded Orthodox priest who was ecstatic over the upset result.
Seated in the dark at Saint Nikola Church because of a power failure, the 71-year-old priest gloated at “the defeat of satanic forces” in the West bent on strengthening NATO, expanding gay rights and championing Western notions of tolerance.
“God has reached out his hand and touched the United States to help us all,” said Father Krivokapic, a bitter foe of the American-led military alliance and of the values that American power has brought to the far corners of the world, even to Kotor, an ancient fortified town on the Adriatic coast of Montenegro.
The election of Mr. Trump on Tuesday has presented an unexpected gift to leaders — political, spiritual and ideological — who resent the encroachment of the West and now rejoice at a result that in their eyes shows how liberal democracy produces nothing but an angry populace and wild unpredictability.
Mr. Trump has openly questioned some of the basic tenets of America’s role in the world. Now his election has stirred confidence in America’s biggest rivals, Russia and China, that they will have more room to assert their own strategic interests, whether in Ukraine, the Baltics or the South China Sea.
“A weakened and disorganized West like this will surely bring many more additional strategic opportunities for China,” said Shi Yinhong, professor of international relations at Renmin University. Mr. Xi, who has been the strongest foreign policy president for China, will be further emboldened, Mr. Shi said, and will be “even less prudent” in his foreign policy.
But beyond that, the election is being viewed as a comeuppance for a country that lectures others about the superiority of American values. While Mr. Putin and his Kremlin aides were restrained in their initial public response to the result, “undoubtedly, they are drinking Champagne,” said Gleb O. Pavlovsky, a political consultant who once worked for the Kremlin.
This, Mr. Pavlovsky said, is “for two reasons: one political, the other psychological.”
For Russia, the triumph of Mr. Trump, just five months after Britain’s shock vote to leave the European Union, accelerates an unraveling of the Western order, a trend that the Kremlin has worked tirelessly to promote through disinformation and the funding of anti-establishment parties like the National Front in France.
China, far more dependent on economic ties to the West than Russia is, has avoided trying to stoke turbulent populist sentiments in Western countries but, with a shared hostility toward liberal democracy, has moved increasingly close to Russia to form a united authoritarian front.
Russian politicians and analysts cheered Mr. Trump’s victory as an opportunity for Russia to extend its global influence and, possibly, shed economic sanctions imposed by the United States and Europe over Crimea and Ukraine.
Mr. Putin, speaking to ambassadors presenting their credentials in the Kremlin, sought to play down any expectations in Russia of a sudden warming of now ice-cold relations with Washington. “We understand and are aware that it will be a difficult path, in view of the degradation that U.S.-Russian relations have unfortunately suffered,” Mr. Putin said.
But more important for Russia than any quick gains was a feeling that after years of enduring criticism from Washington over its steady retreat from Western-style democracy, Russia can now point a finger at the United States.
Even before Election Day, Russian state-owned news media hammered the same simple message, said Maria Lipman, editor of Counterpoint, a journal published by the Institute for European, Russian and Eurasian Studies, George Washington University: “‘Our democracy might not be perfect, but look at theirs. It stinks.’”
The result — the victory of a businessman who delighted in shredding the conventions of political decorum and of an America-led Western order in place since the end of World War II, has “proved Russia right,” Ms. Lipman added, and shown that the United States is “no shining city on a hill.”
Russia, meanwhile, has been busy building its own alternative city, a beacon for all those who long for a more secure, illiberal world rooted in faith and traditional values. At the center of this effort has been Patriarch Kirill, the head of the Russian Orthodox Church and a close ally of Mr. Putin.
On Wednesday, the patriarch said he was praying for divine assistance for Mr. Trump, adding, “There’s now hope for good changes both domestically and internationally.”
Like Russia, China has long bridled at American complaints about its illiberal ways, rejecting the idea that human rights and free speech are universal values and insisting that China has found its own political model rooted in uniquely Chinese values that put stability above all else.
In the days before the election, the Chinese government, eager to point out to its citizens the advantages of one-party rule by the Communist Party, used the nastiness of the Trump vs. Clinton contest to warn about the evils of American democracy.
“America is terribly ill,” wrote Yuan Peng, the vice president of a state-run research center, the China Institutes of Contemporary International Relations. His article in The People’s Daily, the flagship newspaper of the Communist Party, said the election would be remembered as a “page of ‘dirty, chaotic and poor performance.’”
President Xi, the head of the Communist Party, avoided mockery in his congratulatory message to Mr. Trump and emphasized that “I place great importance on the China-U.S. relationship,” while quietly advising him in coded language to stay out of China’s way. Mr. Xi, Chinese state television reported, said he had told the president-elect that he hoped “to strive with you to uphold the principles of not engaging in conflict or confrontation, and of cooperation for mutual gain.”
Although Mr. Trump’s intentions remained unclear, the very uncertainties of his victory have given the Chinese leader an opportunity to pursue a number of strategic advantages across Asia, analysts said.
“The general line from China will be: ‘The United States is unreliable. You have to accommodate us,’” said Peter Jennings, the director of the Australian Strategic Policy Institute in Canberra.
If Mr. Trump delivers on his promise to downgrade America’s traditional alliances in Asia, China will almost certainly capitalize on an American retreat by trying to push the United States aside in a region Beijing considers its natural sphere of influence. At the same time, China is hoping that he reneges on his pledges to take on China over trade and slap hefty tariffs on its exports to the United States.
With his growing Navy, Mr. Xi may now feel emboldened to pursue more control of the South China Sea, the major waterway that carries trillions of dollars of the world’s trade, and that he insists belongs to China. He will almost certainly use increasingly big financial inducements to pick off smaller countries like the Philippines and Malaysia that were already moving closer to Beijing, and midsize American allies like Australia that are moving closer to China’s economic order.
The outcome of the American election, however, may not be all positive for China. Feeling abandoned by the United States, and vulnerable to an emboldened and increasingly assertive China, Japan and South Korea could both decide to develop their own nuclear arsenals.
In South Korea, where there is a powerful lobby for the country to become a nuclear power, there is about a 50 percent chance of going nuclear, said Andray Abrahamian, associate research director of Choson Exchange.
The Japanese government called an emergency meeting Wednesday night, to consider its options. Prime Minister Shinzo Abe faced questions about the future shape of the military alliance, but also recognized that the Obama administration’s trade pact, the Trans-Pacific Partnership, was dead. Mr. Abe had taken big political risks at home to win concessions for the trade deal, which Mr. Trump has vilified.
The Trump triumph could also hold peril for Russia, where state media has for weeks presented the billionaire as a much-needed break from the supposedly Russophobic attitudes of President Obama and Hillary Clinton. In a Facebook post, Andrey Loshak, a Russian journalist, predicted that Mr. Trump’s entry to the White House would deprive the Kremlin of what has become one of its most potent political tools: blaming the Obama administration for all of Russia’s troubles.
“The worldview planted into Russians’ minds that America is to blame for all and every ill, including urine-stained porches and alcoholic neighbors, crumbles. Who is to be hated now?” Mr. Loshak wrote. “You can’t do without a specter of a good, high-quality enemy these days.”