As he prepares to retire next month, Defense Secretary Robert M. Gates is sounding increasingly stark warnings about how a prolonged freeze in defense spending could curtail U.S. military power for decades.

Gates’s latest lecture came Tuesday, when he told a mostly hawkish audience at the American Enterprise Institute that the country’s “bleak fiscal outlook” is likely to force the Pentagon to shrink the size of the armed forces. He also said the U.S. military will have to make hard choices about what kinds of missions to prepare for instead of planning how to respond to possible situations around the world.

“I’ve said repeatedly that I’d rather have a smaller, superbly capable military than a larger, hollow, less-capable one,” said Gates, who is due to leave office June 30 after leading the Pentagon for 41 / 2 years. “However, we need to be honest with the president, with the Congress, with the American people, indeed ourselves, about what those consequences are: that a smaller military, no matter how superb, will be able to go fewer places and be able to do fewer things.”

Gates’s cautionary words come as the U.S. military is embroiled in wars in Afghanistan, Iraq and Libya, and has taken a critical role in providing humanitarian assistance to Japan and Haiti over the past 18 months.

But after a decade in which its budget has roughly doubled, the Pentagon now confronts an indefinite period of retrenchment. President Obama has pledged to reduce projected spending on national security by $400 billion over the next 12 years, the “preponderance of which would come from the Department of Defense,” Gates said.

That’s on top of $78 billion in long-term spending reductions that the defense secretary announced earlier this year, as well as $100 billion that he said would be cut from wasteful or inefficient programs and reallocated for new weapons and other purposes.

All told, the cuts would leave the Pentagon with flat budgets — increasing just below the rate of inflation — until at least 2024. With personnel and health-care costs for troops and retirees rising rapidly, that leaves a much smaller share for needed ships, submarines, fighter jets and other weapons, Gates said.

The Obama administration has proposed a $553 billion budget for the Pentagon next year, excluding the cost of the wars in Afghanistan and Iraq.

In recent weeks, Gates has warned Congress as well as other members of the administration against making simple across-the-board cuts in defense spending. Rather, he has said, lawmakers and the White House need to make strategically difficult decisions about which military missions the nation can no longer afford.

“I want to force that kind of a discussion,” Gates told reporters last week. “If we’re going to cut the military, if we’re going to reduce the resources and the size of the U.S. military, people need to make conscious choices about what the implications of that are for the security of the country, as well as for the operations that we have around the world.”

Gates has been vague about framing those choices, with his aides saying he wants to leave them up to his presumed successor, CIA Director Leon Panetta, who will take office July 1 if the Senate approves his nomination.

But in his speech Tuesday, Gates singled out several highly expensive weapons as sacrosanct, including the F-35 Joint Strike Fighter, a new class of ballistic missile submarines and a new fleet of aerial refueling tankers for the Air Force. Each of the programs has been plagued by cost overruns or projections, but he called them “absolutely critical” for the nation’s defense.