WASHINGTON (AP) -- With a solemnity reserved for momentous occasions, the Senate passed historic legislation Thursday offering the priceless hope of citizenship to millions of immigrants living illegally in America's shadows. The bill also promises a military-style effort to secure the long-porous border with Mexico.
The bipartisan vote was 68-32 on a measure that sits atop President Barack Obama's second-term domestic agenda. But the bill's prospects are highly uncertain in the Republican-controlled House, where party leaders are jockeying for position in advance of expected action next month.
Spectators in galleries that overlook the Senate floor watched expectantly as senators voted one by one from their desks. Some onlookers erupted in chants of "Yes, we can" after Vice President Joe Biden announced the vote result.
After three weeks of debate, there was no doubt about the outcome. Fourteen Republicans joined all 52 Democrats and two independents to support the bill.
In a written statement, Obama coupled praise for the Senate's action with a plea for resolve by supporters as the House works on the issue. "Now is the time when opponents will try their hardest to pull this bipartisan effort apart so they can stop commonsense reform from becoming a reality. We cannot let that happen," said the president, who was traveling in Africa.
In the final hours of debate, members of the so-called Gang of 8, the group that drafted the measure, frequently spoke in personal terms while extolling the bill's virtues, rebutting its critics - and appealing to the House members who turn comes next.
"Do the right thing for America and for your party," said Sen. Bob Menendez, D-N.J., who said his mother emigrated to the United States from Cuba. "Find common ground. Lean away from the extremes. Opt for reason and govern with us."
Arizona Republican Sen. Jeff Flake said those seeking legal status after living in the United States illegally must "pass a background check, make good on any tax liability and pay a fee and a fine." There are other requirements before citizenship can be obtained, he noted.
He, too, spoke from personal experience, recalling time he spent as a youth working alongside family members and "undocumented migrant labor, largely from Mexico, who worked harder than we did under conditions much more difficult than we endured."
Since then, he said, "I have harbored a feeling of admiration and respect for those who have come to risk life and limb and sacrifice so much to provide a better life for themselves and their families."
The bill's opponents were unrelenting, if outnumbered.
"We will admit dramatically more people than we ever have in our country's history at a time when unemployment is high and the Congressional Budget Office has told us that average wages will go down for 12 years, that gross national product per capita will decline for 25-plus years, that unemployment will go up," said Sen. Jeff Sessions, R-Ala.
"The amnesty will occur, but the enforcement is not going to occur, and the policies for future immigration are not serving the national interest."
But with a weeklong July 4 congressional vacation looming, the bill's foes agreed to permit the final vote one day before Senate rules mandated it.
In the Senate, at least, the developments marked an end to years of gridlock on immigration. The shift began taking shape quickly after the 2012 presidential election, when numerous Republican leaders concluded the party must show a more welcoming face to Hispanic voters who had given Obama more than 70 percent of their support.
Even so, division among Republicans was evident as potential 2016 presidential contenders split. Sen. Marco Rubio of Florida was one of the Gang of 8, while Sens. Rand Paul of Kentucky and Ted Cruz of Texas were opposed to the bill.
The legislation's chief provisions includes numerous steps to prevent future illegal immigration - some added in a late compromise that swelled Republican support for the bill - and to check on the legal status of job applicants already living in the United States. At the same time, it offers a 13-year path to citizenship to as many as 11 million immigrants now living in the country unlawfully.
Under the deal brokered last week by Republican Sens. John Hoeven of North Dakota and Bob Corker of Tennessee and the Gang of 8, the measure requires 20,000 new Border Patrol agents, the completion of 700 miles of fencing and deployment of an array of high-tech devices along the U.S.-Mexico border.
Those living in the country illegally could gain legal status while the border security plan was being implemented, but would not be granted permanent resident green cards or citizenship.
A plan requiring businesses to check on the legal status of prospective employees would be phased in over four years.
Other provisions would expand the number of visas available for highly skilled workers relied upon by the technology industry. A separate program would be established for lower-skilled workers, and farm workers would be admitted under a temporary program. In addition, the system of legal immigration that has been in effect for decades would be changed, making family ties less of a factor and elevating the importance of education, job skills and relative youth.
With the details of the Senate bill well-known, House Speaker John Boehner said at a news conference the separate legislation the House considers will have majority support among Republicans. He also said he hopes the bill will be bipartisan, and he encouraged a group of four Democrats and three Republicans trying to forge a compromise to continue their efforts.
He offered no details on how a House bill could be both bipartisan and supported by more than half of his own rank and file, given that most of the bills that have moved through the House Judiciary Committee recently did so on party line votes over the protests of Democrats. None envisions legal status for immigrants now in the country illegally.
Boehner declined to say if there were circumstances under which he could support a pathway to citizenship, but he made clear that securing the border was a priority.
"People have to have confidence that the border is secure before anything else is really going to work. Otherwise, we repeat the mistakes of 1986," he said, referring to the last time Congress overhauled the immigration system.
Rep. Nancy Pelosi of California, the House Democratic leader, also said he favors a bipartisan approach. At the same time, she noted that Democratic principles for immigration include "secure our borders, protect our workers, unite families, a path to legalization and now citizenship for those" without legal status.
Associated Press writer Donna Cassata contributed to this story.
The 68-32 roll call Thursday by which the Senate passed a comprehensive immigration bill.
A "yes" vote is a vote to pass the bill.
Voting yes were 52 Democrats, 14 Republicans and 2 independents.
Voting no were 0 Democrats and 32 Republicans.
Brown (D), Yes; Portman (R), No.
McConnell (R), No; Paul (R), No.
Coats (R), No; Donnelly (D), Yes.
Sessions (R), No; Shelby (R), No.
Begich (D), Yes; Murkowski (R), Yes.
Flake (R), Yes; McCain (R), Yes.
Boozman (R), No; Pryor (D), Yes.
Boxer (D), Yes; Feinstein (D), Yes.
Bennet (D), Yes; Udall (D), Yes.
Blumenthal (D), Yes; Murphy (D), Yes.
Carper (D), Yes; Coons (D), Yes.
Nelson (D), Yes; Rubio (R), Yes.
Chambliss (R), No; Isakson (R), No.
Hirono (D), Yes; Schatz (D), Yes.
Crapo (R), No; Risch (R), No.
Durbin (D), Yes; Kirk (R), Yes.
Grassley (R), No; Harkin (D), Yes.
Moran (R), No; Roberts (R), No.
Landrieu (D), Yes; Vitter (R), No.
Collins (R), Yes; King (I), Yes.
Cardin (D), Yes; Mikulski (D), Yes.
Cowan (D), Yes; Warren (D), Yes.
Levin (D), Yes; Stabenow (D), Yes.
Franken (D), Yes; Klobuchar (D), Yes.
Cochran (R), No; Wicker (R), No.
Blunt (R), No; McCaskill (D), Yes.
Baucus (D), Yes; Tester (D), Yes.
Fischer (R), No; Johanns (R), No.
Heller (R), Yes; Reid (D), Yes.
Ayotte (R), Yes; Shaheen (D), Yes.
Chiesa (R), Yes; Menendez (D), Yes.
Heinrich (D), Yes; Udall (D), Yes.
Gillibrand (D), Yes; Schumer (D), Yes.
Burr (R), No; Hagan (D), Yes.
Heitkamp (D), Yes; Hoeven (R), Yes.
Coburn (R), No; Inhofe (R), No.
Merkley (D), Yes; Wyden (D), Yes.
Casey (D), Yes; Toomey (R), No.
Reed (D), Yes; Whitehouse (D), Yes.
Graham (R), Yes; Scott (R), No.
Johnson (D), Yes; Thune (R), No.
Alexander (R), Yes; Corker (R), Yes.
Cornyn (R), No; Cruz (R), No.
Hatch (R), Yes; Lee (R), No.
Leahy (D), Yes; Sanders (I), Yes.
Kaine (D), Yes; Warner (D), Yes.
Cantwell (D), Yes; Murray (D), Yes.
Manchin (D), Yes; Rockefeller (D), Yes.
Baldwin (D), Yes; Johnson (R), No.
Barrasso (R), No; Enzi (R), No.