A defiant Democratic-controlled Senate passed legislation Thursday that would require the start of U.S. troop withdrawals from Iraq by Oct. 1, propelling Congress toward a historic veto showdown with President Bush on the war.

At the White House, the president immediately promised a veto.

"It is amazing that legislation urgently needed to fund our troops took 80 days to make its way around the Capitol. But that's where we are," said deputy press secretary Dana Perino.

The 51-46 vote was largely along party lines, and like House passage of the same bill a day earlier, fell far short of the two-thirds margin needed to overturn the president's threatened veto. Nevertheless, the legislation is the first binding challenge on the war that Democrats have managed to send to Bush since they reclaimed control of both houses of Congress in January.

Click here to see how your senators voted.

"The president has failed in his mission to bring peace and stability to the people of Iraq," said Sen. Robert Byrd, Democratid chairman of the Appropriations Committee. He later added: "It's time to bring our troops home from Iraq."

On Friday, the Senate Leadership Sens. Harry Reid, Dick Durbin, Chuck Schumer and Patty Murray will urge the President to sign the Iraq spending bill and lay out a strategy to change the mission in Iraq from policing a civil war to focusing on counter-terrorism.

The $124.2 billion bill requires troop withdrawals to begin Oct. 1, or sooner if the Iraqi government does not meet certain benchmarks. The House passed the measure Wednesday by a 218-208 vote.

An Iraqi government spokesman criticized the vote.

"We see some negative signs in the decision because it sends wrong signals to some sides that might think of alternatives to the political process," Ali al-Dabbagh told The Associated Press.

At the Defense Department, the top U.S. commander in Iraq, Gen. David Petraeus, told reporters the war effort likely will "get harder before it gets easier."

Republicans said the vote amounted to little more than political theater because the bill would be dead on arrival after reaching the White House. Bush said he will veto the bill so long as it contains a timetable on Iraq, as well as $20 billion in spending added by Democrats.

"The solution is simple: Take out the surrender date, take out the pork, and get the funds to our troops," said Republican Leader Mitch McConnell.

Republicans Gordon Smith and Chuck Hagel sided with 48 Democrats and Independent Bernard Sanders in supporting the bill. No Democrats joined the 45 Republicans in voting against it. Missing from the vote were Republican Sens. John McCain and Lindsey Graham, both staunch advocates of the president's Iraq policy.

Sen. Joseph Lieberman, an independent, sided with Republicans in opposing the bill.

"We delude ourselves if we think we can wave a legislative wand and suddenly our troops in the field will be able to distinguish between Al Qaeda terrorism or sectarian violence. Or that Iraqis will suddenly settle their political differences because our troops are leaving," Lieberman said.

Democrats said the bill was on track to arrive on the president's desk by Tuesday, the anniversary of Bush's announcement aboard the deck of the USS Abraham Lincoln that major combat operations in Iraq had ended.

"The battle of Iraq is one victory in a war on terror that began on Sept. 11, 2001, and still goes on," Bush said on May 1, 2003, in front of a huge "Mission Accomplished" banner.

Bush since has acknowledged that the war has not progressed as he had hoped. After the November elections in which Democrats swept up enough seats to take the majority, he announced a new strategy that involved sending additional forces to Iraq.

Perino said earlier that if Democratic lawmakers timed the sending of the bill to the anniversary of Bush's speech, it would be a ridiculous public relations stunt.

"That is the height of cynicism, and absolutely so unfortunate for the men and women in uniform and their families who are watching the debate," she said Thursday.

As Democrats pushed through the bill, Petraeus depicted the situation in Iraq as "exceedingly complex and very tough." He said there have been some improvements in the two months since Bush's troop buildup began, but "there is vastly more work to be done across the board. ... We are just getting started with the new effort."