WASHINGTON (AP) ' Turning their budget knife to domestic programs to protect the Pentagon, House Republicans on Thursday approved legislation cutting food stamps, benefits for federal workers and social services programs like day care for children and Meals on Wheels for the elderly.

President Barack Obama's Wall St. reform law would be rewritten under the legislation, passed on a 218-199 vote, while his controversial overhaul of the U.S. health care system would also be cut. The legislation would deny illegal immigrants child tax credits they can currently claim, while new curbs on medical malpractice lawsuits are credited with driving down Medicare and Medicaid costs.

The bill, passed after a passionate, sometimes hyperbolic debate, would spare the military from a $55 billion, 10 percent automatic budget cut next year that's punishment for the failure of last year's deficit-reduction "supercommittee" to strike a deal. It also would protect domestic agencies from an 8 percent cut to their day-to-day operating budgets next year, but would leave in place a 2 percent cut to Medicare providers.

The legislation is a dead letter in the Senate, however, where Democratic leaders insist on keeping the automatic cuts in place as leverage to try to force Republicans to agree to a mixture of tax increases and spending cuts to address the nation's deficit woes.

Defense hawks warn the automatic cuts would mean a 200,000 troop cut, military base closings and a significantly smaller Navy and Air Force. The Pentagon brass has warned repeatedly the automatic cuts would have a debilitating effect on readiness.

There's common agreement that the automatic cuts need to be reversed, but Democrats and Republicans remain at war over the best way to do that.

"Today we are having a debate over whether to eliminate wasteful, duplicative spending and unnecessary, flawed federal programs" or to let automatic cuts "disarm our military, disrupt their operational capabilities and shrink America's fighting force," said Rep. Tom Price, R-Ga. "Do we really want to have the men and women of our military pay the price for Washington's fiscal irresponsibility?"

Democrats countered that the GOP plan, which swaps more than $300 billion in cuts over the coming decade to preserve $78 billion in spending next year, unfairly targets the poor while preserving tax breaks enjoyed by the wealthy and corporations.

"They are protecting the massive Pentagon budget with all its waste ... and finding even deeper cuts in programs that benefit the people of this country," said Rep. Jim McGovern, D-Mass. "This bill before us would create a government where there is no conscience, where the wealthy and well-connected are protected and enriched ' and the middle class, the poor and the vulnerable are essentially forgotten."

The replacement cuts include blocking illegal immigrants from claiming refundable tax credits of up to $1,000 a child, cutting almost 2 million people off food stamps and denying school lunches to 280,000 children.

Sixteen Republicans opposed the measure, mostly more moderate members such as Reps. Frank Wolf of Virginia and Steve LaTourette of Ohio. No Democrats voted for it.

Despite its austerity, the measure could actually increase the deficit in the near term by about $24 billion since its spending cuts would take effect over time while the automatic cuts are more immediate.

The butter-for-guns swap faces a veto threat from the White House, which says it "relies entirely on spending cuts that impose a particular burden on the middle class and the most vulnerable among us, while doing nothing to raise revenue from the most affluent."

Democrats are making it plain they expect any effort to turn off automatic spending cuts to include additional taxes. The resulting deadlock is highly unlikely to be resolved before Election Day.

The measure includes changes to the food stamp program through tighter enforcement of eligibility rules and would cut back a 2009 benefit increase, costing a family of four $57 a month. Federal workers would have to contribute 5 percent more of their pay toward pension plans that are more generous than most private sector workers receive.

Fully 25 percent of the cuts come from programs that benefit the poor, while cuts to Obama's health care overhaul also affect those with modest incomes, prevention funding and efforts by states to set up insurance exchanges.

A cut to the Social Services Block Grants, which Republicans say duplicates other programs, would hit programs like Meals on Wheels for the elderly, child care and child abuse prevention. Another provision opposed by most Democrats would deny illegal immigrants tax refunds from the $1,000-per-child tax credit ' even though most of the children in question are U.S. citizens.

Republicans said much of the food stamp savings would come from tightening eligibility and that the savings equal just 4 percent of the program's budget. And they said it's wrong for illegal immigrants to claim refundable child tax credits when they are ineligible for other federal benefits, like the earned income tax credit for the working poor.

The Congressional Budget Office issued a new analysis of the GOP measure as well, declaring that it would cut the deficit by perhaps $238 billion over the coming decade. But deficits for next year would increase by $24 billion or so ' and would increase $11 billion more if Democrats succeed in reversing GOP efforts to cut agency budgets below last summer's budget and debt pact.

The measure would take away the government's authority to liquidate "too big to fail" financial institutions to avoid a Wall Street crisis, claiming $22.5 billion in paper savings that most budget experts say are illusory. It also would block states from trimming their Medicaid rolls and eliminate a new program to help homeowners who are "underwater" on their mortgages with loan modifications.

Separately, the House passed, 247-163, a $51 billion measure funding the Commerce and Justice departments. The measure doesn't have the sharp cuts that some future spending measures will have, which helped it win support from 23 Democrats.