WASHINGTON — 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. Even so, the bill's prospects are highly uncertain in the Republican-controlled House, where conservatives generally oppose citizenship for immigrants living in the country unlawfully.

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 bill's passage.

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.

South Carolina's Republican senators split their votes. Lindsey Graham, a member of the Gang of Eight which crafted the legislation, voted for it. Tim Scott voted against it.

“There's no question our immigration system is broken and needs to be fixed, beginning with securing our border before moving forward with other aspects of reform.” Scott said. “Unfortunately, the legislation that passed today does not take that necessary step. I believe we can and should tackle immigration reform with targeted, responsible efforts that secure the border, enforce existing laws, and create a workable, efficient system for future immigrants. I am hopeful that we will arrive at a more focused final product that fixes our immigration challenges and finally addresses the realities along our border.”

Graham told Fox News on Sunday: “I want to get reattached to the Hispanic community, to sell conservativism, pass comprehensive immigration reform and grow this party. The party has got to be bigger than Utah and South Carolina. The Hispanic community is close to our values but we have driven them away over this issue.”

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 Eight, 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.

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.”

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.

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.

GRAPHIC:

For an interactive graphic about the issues surrounding U.S. immigration policy, go to postandcourier.com/immigration-interactive.