The win by Obama and Defense Secretary Robert Gates is a switch from where the House stood last year under Democratic control. It reflects a sustained administration push to win over the votes of scores of Republican freshmen elected last fall on campaign promises to cut the budget.
Many taxpayer watchdog groups also weighed in against the engine program, slated to cost $3 billion over the next few years and $450 million this year alone.
The 233-192 tally was a loss for House Speaker John Boehner, R-Ohio, whose state reaped thousands of jobs from the engine, built by the General Electric Co. and Rolls-Royce.
It was a big victory for lawmakers from Democrat-dominated Connecticut, where the main F-35 fighter engine is built by Pratt & Whitney, a unit of United Technologies Corp. Former President George W. Bush had also tried to kill the second engine.
The showdown vote came just hours after Gates and Joint Chiefs Chairman Adm. Mike Mullen testified against the alternative engine before the Armed Services Committee, which has repeatedly backed it.
"I've been doing money a long time, I can't make sense out of a second engine," Mullen said.
The vote was an early test for 87 GOP freshmen who confronted a choice between cutting spending and injecting competition into the F-35 program, the costliest weapons program in Defense Department history.
The money for the engine was included in a $1.2 trillion spending bill that would make deep cuts while wrapping up the unfinished business lawmakers inherited after last year's collapse of the budget process. That includes $1.03 trillion for agency operating budgets that need annual approval by Congress and $158 billion for military operations in Iraq and Afghanistan.
The Democratic-controlled Senate supports the second engine. That, combined with Boehner's backing, could yet keep the program alive.
The engine battle divides along regional rather than party lines, in contrast to the partisan warfare on the underlying bill, which sharply cuts domestic programs and foreign aid and earned a veto threat from the White House budget office and a warning from Obama against unwise cuts "that could endanger the recovery."
Debate on the bill is expected to take all week. A frosty reception awaits the bill in the Democratic-controlled Senate, which won't take up its version until next month. So it'll require passage of a separate short-term government funding bill by March 4 to prevent a government shutdown that neither side says it wants.
The GOP bill, separate from the 2012 budget Obama unveiled on Monday, covers spending for the fiscal year that ends Sept. 30.
The GOP legislation would make sweeping cuts to domestic programs ranging from education and science to agriculture and the Peace Corps. It slashes the Environmental Protection Agency, a favorite target of Republicans, by 29 percent from last year's levels, and would eliminate federal funding for public broadcasting, the AmeriCorps national service program, police hiring grants and family planning programs unpopular with conservatives.
The Food and Drug Administration budget would decline by 10 percent, and spending also would fall by 10 percent for a food program for pregnant women and mothers and their children.
The cuts are all the more dramatic because they would be shoehorned into the last half of the budget year that started Oct. 1.
The bill marks the first significant attack on federal deficits by Republicans elected last fall with the support of smaller-government tea party activists.
The measure came to the floor just a day after Obama unveiled his budget for next year and is merely a first round in what looms as a politically defining struggle that soon will expand to encompass Social Security, Medicare and Medicaid, the massive government programs that provide benefits directly to tens of millions of people.
"We know we can't balance this budget simply by reducing non-security, nondefense spending," said Rep. Mike Simpson, R-Idaho, referring to the 359-page bill that would cut $61 billion from domestic programs.
The measure is sweeping in its scope, cutting spending from literally hundreds of domestic budget accounts and eliminating many others. At the same time, the Pentagon budget would be increased by almost 2 percent from current levels.
In a reflection of tea party priorities, the practice in which lawmakers direct money to their pet projects is banned in the bill. And in a fulfillment of a promise that Republicans made to the voters last fall, about $100 billion would be cut from funds that Obama requested for the current fiscal year.
At a White House news conference, Obama said he looked forward to working with lawmakers in both parties on the spending bill, but warned against "a series of symbolic cuts this year that could endanger the (economic) recovery."
A few hours after Obama spoke, the White House issued a formal statement expressing "strong opposition" to the legislation for "cuts that would sharply undermine core government functions and investments key to economic growth and job creation."