“We basically gutted our military after World War I, after World War II, in certain ways after Korea, certainly after Vietnam and after the end of the cold war,” Mr. Gates said. “Experience is the ability to recognize a mistake when you make it again.”

Image The Joint Strike Fighter program, which rolled out a jet in 2006, is said to be a target for cuts. Credit... Mike Fuentes/Bloomberg News

Mr. Gates acknowledges that military spending is almost certain to level off, and he expressed a goal that the Pentagon budget at least keep pace with inflation over coming years.

Apprehension over potential budget cuts has trickled down the Pentagon bureaucracy to those who each year draft the military’s spending proposals.

“If that’s what they want, they have to know that we simply cannot do everything we are doing now, but for less money,” said one Pentagon budget officer who was not authorized to speak for attribution. “So if there’s going to be less, it’s up to the president, Congress and the public to tell us what part of our national security mission we should stop carrying out.”

Much of the Pentagon budget pays for personnel costs, which are difficult to cut at any time, and particularly while troops are risking their lives in combat.

Mr. Obama has said his plan to begin drawing down American forces from Iraq would ease a wartime taxpayer burden that now totals over $10 billion a month. But budget analysts at the Pentagon and on Capitol Hill say that even troop reductions in Iraq  whether at the cautious pace laid out by President Bush and endorsed by Mr. McCain or at the more rapid pace prescribed by Mr. Obama  would present little savings in the first years.

Moving tens of thousands of troops and their heavy equipment home from the Persian Gulf region is a costly undertaking. And housing at stateside bases is more expensive than in the war zone, so savings would be seen only in subsequent years.