The House's 272-142 vote also sent the president a $555 billion catchall spending bill that combines the war money with money for 14 Cabinet departments.
Bush and his Senate GOP allies forced the Iraq money upon anti-war Democrats as the price for permitting the year-end budget deal to pass and be signed. But other Democrats were eager to avoid being seen as not supporting troops who are in harm's way - and avoid weeks of bashing by Bush for failing to provide that money.
"This is a blank check," complained Rep. Jim McGovern, D-Mass. "The new money in this bill represents one cave-in too many. It is an endorsement of George Bush's policy of endless war."
The vote reflected the reluctance by each party to deny money to troops in the field. At the same time, anti-war Democrats had found their position weakened by the decline in violence in Iraq.
War spending aside, Bush's GOP allies were divided over whether the overall spending bill was a victory for their party in the months-long fight with Democrats over agency budgets.
Conservatives and outside groups such as the Club for Growth, which seeks to elect lawmakers opposed to tax and spending increases, criticized the bill for having about $28 billion in domestic spending that topped Bush's budget and was paid for by a combination of "emergency" spending, transfers from the defense budget and other maneuvers.
Republican leaders acknowledged some excesses. But they said the measure could have cost a lot more if the GOP and the White House not stood firm against more than $20 billion in additional domestic spending included in Democratic spending bills that passed last summer.
"The fact is we got the number down to the baseline," said House Minority Leader John Boehner, R-Ohio.
Boehner supported moves that effectively broke Bush's budget cap to provide record budget increases for veterans and to build a fence and provide additional security along the U.S.-Mexico border.
While disappointed on the Iraq money, Democrats said the spending bill smoothed the rough edges of the president's February budget plan. That proposal had sought below-inflation increases for most domestic programs and contained numerous cuts and program eliminations.
For Democrats, just finishing the budget ended up as the driving goal. They wanted to avoid the humiliation of failing to enact the spending bills after criticizing then-majority Republicans for not doing so last year.
The spending legislation affects virtually every part of the government other than the Defense Department's core programs. It would pay for food and toy safety inspections, NASA, the FBI, the Coast Guard, education, health research and national park operations.
It also contains about 9,000 pet projects sought by lawmakers, at a cost of more than $7 billion, according to Taxpayers for Common Sense, a Washington-based group that fights such projects.
The bill would raise the pay of federal civilian workers by 3.5 percent, extend farm subsidies the food stamp program until March 15 and eliminated money for a next generation nuclear warhead. It also would keep banks from entering the real estate business.
But the White House succeeded in using veto threats to rid the bill of more contentious items such as ending a ban on U.S. aid to overseas family planning groups that perform abortions and easing financing of agricultural and medical sales to Cuba.