The measure to grant legal status to millions of immigrants who came unlawfully into the United States suffered a stunning setback in the Senate on Thursday.
The bipartisan compromise championed by the president failed a crucial test when it could not attract even a simple majority for an effort to speed its passage.
The biggest loser was Mr. Bush, who saw his major domestic initiative go up in smoke — at least for now. The president's Iraq policy has driven his approval ratings to all-time lows and it now appears immigration reform may well go the way of his previous bid to remake the domestic landscape: an overhaul of the Social Security system.
The Senate's Democratic leadership also suffered a setback. Senate leader Harry Reid failed to keep the legislation on track, in part because of the defection of some liberal senators in his own party.
But it was Republican senators who were mainly responsible for the defeat of the bill. Their action reflected widespread conservative unhappiness with the legislation.
Sen. John McCain, a stalwart GOP supporter of the reform package, appeared to be a loser as well. At the Republican presidential debate on Tuesday night, McCain was the only candidate to offer strong support for the president's plan.
Some political observers believe the defeat can be turned into a plus for McCain if the bill's failure eliminates immigration as a major issue for GOP voters.
The legislation now faces a very uncertain future. Democrat Reid said he hoped to pass the measure eventually, but he devoted much of his post-vote comments Thursday night to accusing Mr. Bush of doing too little to obtain Republican support.
"This Is the president's bill," Reid told a hushed chamber. "Where are the president's people helping us with these votes?"
Republican Senator Lindsey Graham defended the administration. "The White House has worked like a dog," he told reporters. Indeed, Commerce Secretary Carlos Gutierrez and Homeland Security Secretary Michael Chertoff lobbied senators inside the Capitol right up until Thursday's showdown vote.
The White House argued the setback was not fatal for Mr. Bush's top domestic priority and urged Reid to allow the bill to continue to be debated and eventually receive a vote. Administration officials monitored the developments from Germany where the president was attending the annual summit of world leaders.
"He obviously is disappointed by the setback," White House counselor Dan Bartlett said of Mr. Bush. "But based on the latest information we have, there still is a good chance this bill could go forward."
Bartlett said the president did not call any lawmakers from Germany to lobby for the measure.
Reid insisted that the bill was not dead, but a crowded Senate calendar complicates its prospects.
"I, even though disappointed, look forward to passing this bill," Reid said. "I have every desire to complete this legislation, and we all have to work — the president included — to figure out a way to get this bill passed."
The measure's chances are even murkier in the House, where Democratic leaders don't plan to act on the divisive issue until the Senate has finished work on it.
Sen. Mitch McConnell, R-Ky., the minority leader, said Democrats tried to rush the bill.
"I think we're giving up on this bill too soon," McConnell said.
The legislation would tighten borders and institute a new system to prevent employers from hiring undocumented workers, in addition to giving up to 12 million illegal immigrants a pathway to legal status.
Conceived by an improbable coalition that nicknamed the deal a "grand bargain," the measure exposes deep rifts within both parties and is loathed by most GOP conservatives.
All but seven Republicans voted against ending debate, with many arguing they needed more time to make the bill tougher with tighter border security measures and a more arduous legalization process for unlawful immigrants. Thirty-eight Republicans and Sen. Bernard Sanders, a Vermont independent, opposed the procedural tactic.
All but 11 Democrats supported the move, but they, too, were holding their noses at provisions of the bill. Many of them argued it makes second-class citizens of a new crop of temporary workers and rips apart families by prioritizing employability over blood ties in future immigration.
Thirty-seven Democrats and Sen. Joseph Lieberman, a Connecticut independent, voted to advance the measure.
Proponents had argued that the bill, on balance, was worth advancing.
"We can all find different aspects of this legislation that we differ with," said Sen. Edward M. Kennedy of Massachusetts, the leading Democratic architect of the bill.
He held out hope after the vote that the measure would survive. "Doing nothing is not an alternative," Kennedy said. "This issue isn't going away."
"I believe that we will yet succeed," said Sen. Arlen Specter, R-Pa., a framer of the bill who was one of few in his party who backed the procedural move.
The defeat for the compromise was the culmination of a week of ups and downs for the contentious immigration measure, which mirrored the tumultuous process that went into crafting it.
Kennedy partnered with Sen. Jon Kyl, R-Ariz., and several centrists to craft a bill that melded conservative themes of tougher border security and limiting immigration with the liberal goal of legalizing those who are in the U.S. unlawfully and welcoming future arrivals.
In the end, however, Kyl broke from the bipartisan clique that hatched the agreement, siding with Republicans who said they hadn't gotten enough chances to toughen the bill.
"It's time to scrap this mess of a bill," said Sen. Jim DeMint, R-S.C., a conservative who had failed in several attempts to make the measure more punitive toward illegal immigrants.