“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.”