The president publicly browbeat and insulted allies as deadbeats taking advantage of American generosity. He then raised the ante, demanding that they meet the 2 percent target — it’s a target, not some specific legal obligation — by January and then go on to raise spending to 4 percent of G.D.P. Why that much? What strategic objective, what threats to the alliance, is Mr. Trump worried about? He didn't say.

Since he came into office, Mr. Trump’s urging has gotten some allies to accelerate spending increases. The response to his latest remonstrations, though, was mainly bafflement. Even after a military spending increase under President Trump, American military spending is only 3.2 percent of G.D.P. this year. What’s more, it’s expected to fall to 2.8 percent in 2024, leaving it unclear as to how even the United States would meet the 4 percent figure.

As Mr. Trump, and Mr. Obama before him, have argued, Europe can do more to help itself. The allies rely too heavily on the Americans to transport troops and equipment, for instance, and the fact that France ran out of bombs during the 2011 Libya operation demonstrated a crucial weakness . There may be other shortcomings, too — NATO is not transparent with its data.

Greater spending by American allies might mean the United States could lower its own spending and bring thousands of troops home. Mr. Trump didn’t make that argument, but he has often talked about withdrawing forces and closing bases, whether in Germany or Syria or somewhere else.

So would the president then push for cuts in the Pentagon budget, which now stands at roughly $700 billion, more than the next eight countries in the world spend together, and use it for, say, badly needed infrastructure? Don’t bet on it. Mr. Trump has relentlessly pushed for a bigger military, seemingly mesmerized by the flashy hardware and the show of hard power that it projects.