The vote comes on the same day that a $163bn war funding bill for Iraq and Afghanistan was defeated in the House by 149 to 141, with 132 Republicans voting "present", meaning neither yes nor no on the legislation.
Republicans withheld support for the bill in protest against extra measures added on by the Democrats, including a "millionaire tax" on wealthy Americans to pay education fees for US veterans of the Iraq and Afghan conflicts.
However, parts including more money for the jobless and an expansion of veterans' education benefits were passed.
George Bush, the US president, has vowed to veto any measure that sets a timeline to withdraw US troops from Iraq as part of any funding bill, having done so once last year.
The White House criticised the pullout bill on Thursday as seeking to "tie the hands of our military commanders and impose an artificial timeline for withdrawal".
However Democrat Nancy Pelosi, speaker of the House, said at a press conference before the vote that the legislation provided a "new direction in Iraq" that would end this "sad chapter" in US history.
But the Democrats are well short of the two-thirds majorities needed in the House or the senate to overturn a Bush veto in order to change the administration's Iraq war policy.