By David E. Sanger and Jim Yardley     May 5, 2016

Alarmed by Donald J. Trump’s grip on the Republican presidential nomination, world leaders are wrestling with the possibility that, even if he loses the general election, his ascent reflects a strain of American public opinion that could profoundly reshape the way the United States addresses security alliances and trade.

From Beijing, Tokyo and Seoul to the headquarters of NATO in Brussels and the vulnerable Baltic nations along Russia’s western border, officials and analysts said in interviews that they saw the success of Mr. Trump’s “America first” platform as a harbinger of pressure for allies to pay up or make trade concessions in return for military protection.

In many capitals, Mr. Trump’s formal and off-the-cuff foreign policy proposals — his threat to pull out of NATO; his musings about removing the United States’ nuclear umbrella over Japan and South Korea; his pledge to slaphuge trade tariffs on China — are regarded with a mix of alarm and confusion. Asked on Thursday if Beijing was concerned about the prospect of a Trump presidency, the Chinese Foreign Ministry spokesman, Hong Lei, replied, “We hope the U.S. people from all walks of life would view bilateral relations from a reasonable and objective perspective.”

Stefano Stefanini, a former representative of Italy to NATO and former diplomatic adviser to the Italian president, put it this way: “There is no Donald Trump contingency plan.”

“The mistake that Europe might make is to think the Trump phenomenon might just fade away,” Mr. Stefanini said. “The sentiments that Donald Trump is expressing will certainly influence the next administration or the next Congress.”

Officials do not see Mr. Trump’s rise as merely an American version of the anti-immigration and isolationist parties that have picked up support across Europe. They are finding signs of tangible political change in statements by Democratic leaders, as well.

Already, Mr. Trump’s assertive positions about American interests have led some officials to look again at President Obama’s recent critique of European and Persian Gulf allies as “free riders.” They have also helped shed light abroad on the domestic political forces at play around Hillary Clinton’s decision to renounce her support for a new Asian trade deal.

Some, too, are revisiting the words of Robert M. Gates in his last weeks as defense secretary in 2011. Mr. Gates warned that a new generation of Americans with no memory of the Cold War would eventually ask whether NATO, the central institution of European security, was an artifact, like the single segment of the Berlin Wall that remains standing as a reminder of the past. In Europe last month, Mr. Obama pressed allies to live up to commitments to spend 2 percent of their gross domestic product on defense, a benchmark that few have hit.

“Some of the claims made during the campaign have been empty or just wrong,” said Peter Westmacott, a former British ambassador to the United States, where he was regarded as one of the savviest analysts of American-European relations. “There is no ‘better Iran nuclear deal,’ and not many people think it is a good idea for South Korea or Japan to acquire nuclear weapons.”

“But others should give us Europeans pause for thought,” he said. “NATO members need to reflect on whether it’s right, or sustainable, for the U.S. to pay over 70 percent of the bill for our collective security, or how to ensure we take care of the losers as well as the winners in global free trade.”

Clearly, many European policy makers were already upset with Mr. Obama’s reluctance to intervene on their behalf in conflicts where they have national interests, and with his demand that European nations put what he called, in an interview with The Atlantic, more “skin in the game.”

Europeans cite the United States’ reluctance to take the lead in ousting Col. Muammar el-Qaddafi from Libya, an operation that revealed major flaws in NATO operations. And they are unconvinced by Mr. Obama’s insistence that he made the right decision in backing away from the “red line” he had drawn over the use of chemical weapons by President Bashar al-Assad of Syria.

“Over all, I would say there are too many signs of American retrenchment and retreat,” said Anders Fogh Rasmussen, a former prime minister of Denmark who was NATO secretary general until 2014. Europeans, he said, would generally prefer an American president “who will demonstrate determined American leadership,” even as, to many analysts, Mr. Trump’s rise suggests pressure for the nation to turn inward.

Mr. Rasmussen said he saw Mr. Trump’s demands on NATO as an acceleration of the Obama administration’s effort to encourage more burden sharing. But they come with an isolationist twist, he said. The “America first” term, embraced by Mr. Trump in a recent interview with The New York Times, goes back to a movement led by Charles A. Lindbergh in the 1930s to keep America out of war in Europe.

The European reaction to the revival of that term has been so sharp that American military leaders, while reluctant to get involved in the campaign, have tried to take on Mr. Trump’s arguments.

Gen. Philip M. Breedlove, who just stepped down as the supreme allied commander for Europe, wrote in The Washington Post this week that when he assumed his position in 2013, he thought that arguments about NATO’s utility were “without merit, and there was no need to engage.” Now, he said, without naming Mr. Trump, he felt compelled “to explain to my fellow countrymen why the United States absolutely needs NATO — a NATO that is strong, resilient and united.”

Five members of the Joint Chiefs of Staff made a similar set of arguments at the Council on Foreign Relations in New York on Tuesday, also avoiding any mention of Mr. Trump’s name.

But to many who live on Russia’s raw border, especially in the Baltic nations in Moscow’s shadow, there is nothing more puzzling than Mr. Trump’s reluctance to criticize President Vladimir V. Putin. He has often spoken admiringly of Mr. Putin, saying he respects his strength and views him as someone with whom he can negotiate. To European ears, that sounds as if Mr. Trump may be playing into Mr. Putin’s hands, opening a rift within NATO.

“Russia’s enthusiasm about Trump seems to be predicated on the assumption that he may actually withdraw forces from Europe,” said Matthew Rojansky, the director of the Kennan Institute, a Washington research group focused on Russia.

That is exactly the fear of others in a region where NATO is the only bulwark against Russia and where some people doubt that an American president would really commit forces to protect them in times of conflict.

After Russia’s intervention in Ukraine, “a lot of Latvians woke up and said, ‘Thank God we are in NATO,’” said Lolita Cigane, a member of the Latvian Parliament.

In neighboring Lithuania, a plaque at Town Hall in the capital, Vilnius, commemorates a 2002 visit by another Republican, President George W. Bush. “Anyone who would choose Lithuania as an enemy has also made an enemy of the United States of America,” Mr. Bush said then. Mr. Obama made a similar vow in Estonia and increased NATO’s presence in Eastern Europe in response to the Russian threat, and Mr. Trump’s position feels like backpedaling to people in the region.

Mr. Trump’s argument that Seoul and Tokyo, which host tens of thousands of American troops, need to pay more or see the troops leave bewildered officials in those countries. Japan pays roughly $2 billion a year toward the troops’ housing, and military leaders often say it would be more costly for American taxpayers to base those same troops in Guam or in the mainland United States. Moreover, those bases are critical for daily intelligence gathering on China and North Korea.

American military officials and diplomats argue that these “forward deployed” bases are critical to maintaining freedom of navigation and deterring North Korea. But Mr. Trump’s argues that they are worth it only if they do not cost the United States a fortune.

“I think the real subliminal message Trump is saying is this: The U.S. can afford to survive and prosper without any allies if it was forced to cut off all ties, but the converse isn’t true,” said Chung Min Lee, a professor of international relations at Yonsei University in Seoul. He added that Mr. Trump was forcing allies “to come up with convincing elevator speeches on the key benefits they bring to the U.S., and thus far, none of them have done so.”

In China, a frequent target of Mr. Trump’s criticism, he is widely viewed as a pragmatist who is less hawkish and less focused on human rights than Mrs. Clinton is.

His proposal to impose high taxes on Chinese goods receives little attention there, and his talk of China’s “raping” the United States in unfair trade deals has been met with shrugs, as if to say that charge is nothing new. Instead, the conversation focuses on Mr. Trump’s business success or his pronouncements on preventing foreign Muslims from entering the United States, an attitude that jibes with the antipathy in much of China toward the Muslim population in the western province of Xinjiang.

“Many in China believe a pro-business Republican president will tend to be pragmatic and China-friendly, if not pro-China,” said Wang Dong, associate professor of international studies at Peking University. “Therefore, many in China tend to view Trump’s remarks of imposing more than 30 percent of tariffs on China as rhetorical campaign language.”

Mr. Trump’s assertion that American troops in South Korea and Japan should be sent back to the United States is in alignment with official, though rarely stated, Chinese goals. But his suggestion, later reversed in part, that Japan and South Korea should be able to develop their own nuclear arsenals alarmed Beijing, especially the notion that Japan, the occupier of China in World War II, would become a nuclear power.