For the first time since the end of the Cold War, the Pentagon is confronting the reality that inexorable increases in defense spending are no longer a sure thing and that cuts that actually shrink the military's bottom line could be on the horizon.

Under direction from the White House, Defense Secretary Robert M. Gates on Thursday announced that the Pentagon will cut projected spending by $78 billion over the next five years and shrink the size of the Army and Marine Corps. The changes mean that the military would see annual budget increases that barely exceed inflation in coming years and that its budget will effectively remain frozen in 2015 and 2016.

Gates said the cuts are a result of the "extreme fiscal duress" facing the country. But they are also an acknowledgment of a rapidly shifting political sentiment on Capitol Hill, where senior Democrats and Republicans alike have suggested in recent weeks that defense spending -- which accounts for a fifth of the federal budget -- is no longer a sacred cow.

In a news conference, Gates said the White House's proposed budget for the Pentagon next year would be $553 billion, excluding the cost of the wars in Afghanistan and Iraq, less than a 1 percent increase over what it requested for 2011. Although he said the military could live with flat budgets in the coming years, Gates warned that deeper cuts in troop levels, overseas bases and weapons programs would be "risky at best and potentially calamitous."

Members of Congress have traditionally protected the defense budget with zeal, mindful of the economic benefits that the military brings to their districts. The new Republican chairman of the House Armed Services Committee, Rep. Howard P. "Buck" McKeon of California, said he was "not happy" with the proposed cuts. "I will not stand idly by and watch the White House gut defense when Americans are deployed in harm's way," McKeon said.

Other key Republicans, however, including House Majority Leader Eric Cantor of Virginia, have said the military won't be exempt from efforts to slash spending. Sen. John McCain of Arizona, a leading GOP voice on national security matters, said he was "concerned" by the Obama administration's new long-term budget proposals for the Pentagon. But he did not reject them outright, and he praised Gates for attacking "waste and unnecessary spending."

Calls to prune even deeper have already begun. Leaders of a bipartisan deficit commission appointed by President Obama have recommended cutting $100 billion in defense spending by 2015.

Even as he has told military officers to brace for hard times, Gates has sought to spare the Pentagon from the budget ax by taking preemptive measures. Over the past two years, he has eliminated dozens of expensive weapons programs, and he more recently sought to persuade lawmakers that the military had adopted a newfound thriftiness that would justify modest but steady annual budget increases.

"We must come to realize that not every defense program is necessary, not every defense dollar is sacred or well-spent, and more of everything is simply not sustainable," Gates told reporters.

On Thursday, he said the armed services had successfully carried out a directive he issued in May to find $100 billion in savings over the next five years by culling low-priority programs, thinning command structures and reducing overhead at the Pentagon.

For example, Gates said he ordered the Marines to kill a $15 billion program to build a new amphibious landing craft. Known as the Expeditionary Fighting Vehicle, the landing craft was under development by Falls Church-based General Dynamics. But it has soared in price and, Gates said, become less relevant as the nature of warfare has evolved.

In return, he said, the military will be allowed to reallocate $70 billion into other weapons systems and projects, including a new long-range bomber for the Air Force, more ships for the Navy and modernized Abrams tanks for the Army. The remainder, about $30 billion, will go to pay unexpected fuel, health-care and other costs.

Defense officials had hoped those savings would be enough to fend off challenges to their total spending levels. But in recent weeks, the White House privately told Gates to come up with the additional $78 billion in budget cuts over the next five years.

To pay that bill, Gates said he would slash the number of private military contractors by nearly a third over the next three years, maintain a freeze on civilian salaries, and raise health-care premiums for military retirees and their families for the first time since 1995. He also said he would cull the number of generals and admirals, shrinking their ranks from about 900 to 800.

The military will also save $4 billion by further delaying production of the Joint Strike Fighter, a critical but cost-plagued program to supply new-generation airplanes to each of the armed services. Also known as the F-35 Lightning II, the plane is being built by Bethesda-based Lockheed Martin.

On top of that, Gates said the armed forces would have to start cutting where military leaders say it really hurts -- troop strength.

Starting in 2015, the Army must trim the number of soldiers on active duty by 27,000 and the Marines by 15,000 to 20,000. The reductions will save a projected $6 billion over two years and are timed to coincide with planned troop withdrawals from the war in Afghanistan. President Hamid Karzai has pledged that Afghan forces will take lead responsibility for that war by the end of 2014.

There are currently about 202,000 Marines on active duty, up from 175,000 in 2007. The Army has about 569,000 soldiers on active duty, including a temporary increase of 22,000 that is already scheduled to lapse in 2014.

Gates also announced that the Army would get a new leader. He said Gen. Martin Dempsey, head of the Army's Training and Doctrine Command, will become Army chief of staff, succeeding Gen. George Casey. Dempsey's promotion will need the approval of the White House and Senate.

Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, said that senior military leaders had consented to the reduction in troop strength: "These are modest changes and ones that we think are well within the risk envelope."

Jacques Gansler, a senior defense official during the Clinton administration, said Gates's proposal to shrink the size of the Army and Marine Corps was "consistent with the end of the wars" in Iraq and Afghanistan, as well as economic reality.

"In a rich man's world, you don't have to make cuts," Gansler said. "Every time we needed something we increased the budget. We had 9/11 and two wars -- those are explainable reasons for expenditures.

"But we also didn't focus on trying to do things for less money. So we've been borrowing it, and you can't afford to keep that up."

Staff writer Dana Hedgpeth contributed to this report.