The legislation, passed 218-203, was largely a symbolic jab at Bush, who already has begun reducing force levels but opposes a congressionally mandated timetable on the war. And while the measure was unlikely to pass in the Senate - let alone overcome a presidential veto - Democrats said they wanted voters to know they weren't giving up.
"The fact is, we can no longer sustain the military deployment in Iraq," said House Speaker Nancy Pelosi, D-Calif. "Staying there in the manner that we are there is no longer an option."
The White House pledged to veto the bill, and Republicans said they would back the president.
"These votes, like the dozens of previous failed votes, put the interests of radical interest groups ahead of the needs of our military and their mission," an administration statement said.
The bill represents about a quarter of the $196 billion Bush requested for combat operations in the 2008 budget year, which began Oct 1.
It would compel an unspecified number of troops to leave Iraq within 30 days, a requirement Bush is already on track to meet as he begins in coming weeks to reverse the 30,000 troop buildup he ordered earlier this year. It also sets a goal of ending combat by Dec. 15, 2008, and states that money included in the bill should be used to redeploy troops and "not to extend or prolong the war."
The measure also would set government-wide standards on interrogation, effectively barring the CIA from using such harsh techniques as waterboarding, which simulates drowning.
The bill was on shaky ground this week, after some liberal Democrats said they were concerned it was too soft and would not force Bush to end the war. Conservative Democrats said they thought it went too far and would tie the hands of military commanders.
The bill's prospects brightened somewhat after three leading anti-war Democrats announced they would support it. California Reps. Lynn Woolsey, Barbara Lee and Maxine Waters said they had agreed to swing behind it because the bill explicitly states the money should be used to bring troops home.
But still uncertain the bill would pass, Pelosi on Wednesday delayed a vote by several hours while she met with supporters and asked them to help her round up votes.
Fifteen Democrats broke ranks and joined 188 Republicans in opposing the measure. Four Republicans joined 214 Democrats in supporting it.
Republicans fought bitterly against the timetable in the bill, as well as the restrictions on interrogations. Rep. John Boehner, R-Ohio, his party's leader, said the bill would lead to "nothing other than failure."
Hours before the scheduled vote, the White House dispatched Defense Secretary Robert Gates and Secretary of State Condoleezza Rice to Capitol Hill to brief lawmakers on Iraq.
In one closed-door meeting, Gates urged a group of senators not to support the bill. He said the same lawmakers who criticized Pentagon civilians for previously ignoring the advice of its uniformed generals were asking him to ignore them now, according to an official who attended the meeting. The official requested anonymity because the meeting was private.
Similar legislation has passed repeatedly along party lines in the House only to sink in the Senate, where Democrats hold a razor-thin majority and 60 votes are needed to overcome procedural hurdles.
It is expected that if the measure fails in the Senate, Democrats will not consider Bush's war spending request until next year. Democrats say the military won't need the money until then and the Pentagon can transfer money from less urgent accounts or from spending set aside for the last three months of this year.
The Pentagon says moving money around is a bureaucratic nightmare that costs more in the long run. And if taken to the extreme, the military would eventually have to freeze contracts or lay off civilian workers to ensure troops in combat have what they need.
In another provision that drew White House opposition, the House bill would require that all government interrogators rely on the Army Field Manual. The manual is based on Geneva Convention standards and was updated in 2006 to specifically prohibit the military from using aggressive interrogation techniques, such as waterboarding.
The White House said in its statement that the Geneva Conventions shouldn't apply to "captured terrorists who openly flout that law."
The bill also would require the president to certify to Congress 15 days in advance that a unit being sent into combat is "fully mission capable," although Bush could waive that requirement if necessary.