But given the strong 68-to-32 vote, with 14 Republicans voting in favor, the Democratic leadership and the bipartisan group of eight senators who drafted the original bill seemed determined to savor the moment. Vice President Joseph R. Biden Jr. presided over the vote as senators announced their positions from their desks, in a ceremonial procedure reserved for special occasions.
Leading up to the vote, many in the "Gang of Eight" that drafted the framework of the legislation took to the Senate floor to give impassioned speeches, including Senator Marco Rubio, Republican of Florida, who is one of his party's leading Hispanic voices. When Mr. Rubio finished, the other senators in the bipartisan group surrounded him on the floor, patting him on the back and offering words of encouragement. "Good job," said one. "I'm proud of you," said another.
The Senate bill provides a 13-year path to citizenship for the 11 million unauthorized immigrants in the country, as well as tough border security provisions that must be in place before the immigrants can gain legal status.
Though overhauling the nation's immigration system became a priority for many Republicans after the 2012 presidential election, in which the Republican nominee, Mitt Romney, was rejected by Hispanic voters, immigration opponents have mounted last-ditch efforts to derail the bill, which they say would offer amnesty without any real enforcement measures.
As the bill heads to the House, Republican elites and their well-financed pro-immigration groups are running up against opposition from the chamber's most conservative members. Speaker John A. Boehner threw cold water on any hope that the House would vote on the Senate plan, and he insisted that whatever immigration measure his chamber took up would have to be supported by a majority of his Republican conference.
"I issued a statement that I thought was pretty clear, but apparently some haven't gotten the message: The House is not going to take up and vote on whatever the Senate passes," he said Thursday morning. "We're going to do our own bill."
The legislation — drafted largely behind closed doors by the bipartisan group — brought together an unlikely coalition of Democrats and Republicans, business groups and labor unions, farmworkers and growers, and Latino, gay rights, and immigration advocates. Along the way, the legislation was shaped and tweaked by a series of backroom deals and negotiations that, in many ways, seemed to mirror its inception.
Even late Wednesday, Senator Charles E. Schumer, Democrat of New York and an author of the bill, found himself on the phone with Gov. Chris Christie of New Jersey, trying to shore up support. In a 30-minute phone call, according to an aide, Mr. Schumer urged Mr. Christie to help persuade Senator Jeffrey S. Chiesa, Republican of New Jersery — newly appointed by Mr. Christie — to vote for the bill. (Mr. Chiesa was one of 14 Republicans who voted "yes" on Thursday afternoon to end debate).
The first big deal, however, came early on, at the end of March, when the nation's top labor and business groups reached an agreement on a guest worker program for low-skilled immigrants. Disagreements between the U.S. Chamber of Commerce and the A.F.L.-C.I.O., the nation's main federation of labor unions, had helped doom a 2007 attempt at a similar overhaul, but the two groups came together to create a program that will expand and shrink based on economic indicators — like the unemployment and job openings figures — and offer a maximum of 200,000 guest visas annually.