WASHINGTON — Far-reaching legislation that grants a chance at citizenship to millions of immigrants living illegally in the United States cleared the Senate Judiciary Committee on a solid bipartisan vote Tuesday night after supporters somberly sidestepped a controversy over the rights of gay spouses.

The 13-5 vote cleared the way for an epic showdown on the Senate floor on legislation that is one of President Barack Obama's top domestic priorities – yet also gives the Republican Party a chance to recast itself as more appealing to minorities.

The action sparked rejoicing from immigration activists who crowded into a Senate committee room to witness the proceedings. "Yes, we can! Si, se puede" they shouted, reprising the campaign cry from Obama's first run for the White House in 2008.

In addition to creating a pathway to citizenship for 11.5 million immigrants, the legislation creates a new program for low-skilled foreign labor and would permit highly skilled workers into the country at far higher levels than is currently the case.

At the same time, it requires the government to take costly new steps to guard against future illegal immigration.

In a statement, Obama said the measure is "largely consistent with the principles of common-sense reform I have proposed and meets the challenge of fixing our broken immigration system."

There was suspense to the end of the committee's deliberations, when Sen. Patrick Leahy, the Vermont Democrat who serves as chairman, sparked a debate over his proposal to give same-sex and heterosexual spouses equal rights under immigration law.

"I don't want to be the senator who asks people to choose between the love of their life and the love of their country," he said, adding he wanted to hear from others on the committee.

In response, he heard a chorus of pleas from the bill's supporters, seconding private appeals from the White House, not to force a vote that they warned would lead to the collapse of Republican support and the bill's demise.

"I believe in my heart of hearts that what you're doing is the right and just thing," said one, Sen. Richard Durbin, D-Ill. "But I believe this is the wrong moment, that this is the wrong bill."

Sen. Chuck Schumer, the New York Democrat who has played a central role in advancing the legislation, said he would have voted against the proposal if Leahy had pressed the case – a defection that would have caused it to fail on a tie even if the rest of the committee Democrats stuck with Leahy. But even before Durbin and Schumer spoke, Sen. Dianne Feinstein, D-Calif., voiced her opposition to Leahy's provision, and after listening to the debate Sen. Al Franken, D-Minn., also joined in with reluctant concerns.

In the hours leading to a final vote, the panel also agreed to a last-minute compromise covering an increase in the visa program for high-tech workers, a deal that brought Sen. Orrin Hatch, R-Utah over to the ranks of supporters.

Under the compromise, the number of highly skilled workers admitted to the country would rise from 65,000 annually to 110,000, with the possibility of a further increase to 180,000, depending in part on unemployment levels.

Firms where foreign labor accounts for at least 15 percent of the skilled work force would be subjected to tighter conditions than companies less dependent on H-IB visa holders.

The compromise was negotiated by Hatch, whose state is home to a growing high tech industry, and Schumer. It is designed to balance the interests of industry, which relies increasingly on skilled foreign labor, and organized labor, which represents American workers.

AFL-CIO President Rich Trumka attacked the deal sharply as "anti-worker," although he also made clear organized labor would continue to support the overall legislation.

Robert Hoffman, senior vice president for government affairs at the Information Technology Industry Council, welcomed the deal. "We obviously want to keep moving the bill forward and building support for the legislation, and this agreement allows us to do so," he said.

The issue of same-sex spouses hovered in the background from the start, and as the committee neared the end of its work, officials said Leahy had been informed that both the White House and Senate Democrats hoped he would not risk the destruction of months of painstaking work by putting the issue to a vote.

"There have been 300 amendments. Why shouldn't we have one more?" he told reporters at one point, hours before calling the committee into session for a final time to debate the legislation.

A few hours later, Republicans and Democrats both answered his question bluntly.

"This would fracture the coalition. I could not support the bill," said Sen. Lindsey Graham, R-S.C., who was a member of the bipartisan so-called Gang of Eight that drafted the core elements of the bill.

Republicans and Democrats alike also noted that the Supreme Court may soon issue a ruling that renders the controversy moot.

In a statement issued after Leahy's action, Chad Griffin, the president of the Human Rights Campaign, said his group was "extremely disappointed that our allies did not put their anti-LGBT colleagues on the spot and force a vote on the measure that remains popular with the American people."

The issue is certain to re-emerge when the full Senate debates the legislation, although it is doubtful that sponsors can command the 60 votes that will be needed to make it part of the legislation.

Senate Majority Leader Harry Reid has said he will bring the legislation to the Senate floor early next month for a debate that some aides predict could consume a month or more, with an outcome that is impossible to predict.

The fate of immigration legislation in the House is even less clear, although it is due to receive a hearing in the Judiciary Committee there on Wednesday.

Despite the concern that bipartisan support for the legislation was fragile, there was no doubting the command over committee proceedings that Senate backers held.

In a final reminder, an attempt by Sen. Ted Cruz., R-Texas, to delete the pathway to citizenship failed on a 13-5 vote.

In defeat, he and others said they, too, wanted to overhaul immigration law, but not the way that drafters of the legislation had done.

Sen. Charles Grassley, R-Iowa, recalled that he had voted to give "amnesty" to those in the country illegally in 1986, the last time Congress passed major immigration legislation. He said that bill, like the current one, promised to crack down on illegal immigration, but said it had failed to do so.

"No one disputes that this bill is legalization first, enforcement later. And, that's just unacceptable to me and to the American people," he said shortly before the vote.

On the final vote, three Republicans – Hatch, Graham and Sen. Jeff Flake, R-Ariz. – joined the 10 committee Democrats in supporting the bill.

The centerpiece provision of the legislation allows the millions of people living in the U.S. illegally to obtain "registered provisional immigrant status" six months after enactment if certain conditions are also met.

Applicants must have arrived in the United States before Dec. 31, 2011, and maintained continuous physical presence, must not have a felony conviction of more than two misdemeanors on their record, and pay a $500 fine.

The registered provisional immigrant status lasts six years and is renewable for another $500. After a decade, though, individuals could seek a green card and lawful permanent resident status if they are up to date on their taxes and pay a $1,000 fine and meet other conditions.

Individuals brought to the country as youths would be able to apply for green cards in five years.

___

AP White House Correspondent Julie Pace contributed to this report.

Also on HuffPost:

Loading Slideshow...
  • The Template: California Proposition 187 (1994)

    California's Proposition 187 was submitted to the voters with the full support of then Republican governor Pete Wilson. It essentially blamed undocumented immigrants for the poor performance of the state economy in the early 1990s. The law called for cutting off benefits to undocumented immigrants: prohibiting their access to health care, public education, and other social services in California. It also required state authorities to report anyone who they suspected was undocumented. <strong>Status:</strong> The law passed with the support of 55 percent of the voters in 1994 but declared unconstitutional 1997. The law was killed in 1999 when a new governor, Democrat Gray Davis, refused to appeal a judicial decision that struck down most of the law. Even though short-lived, the legislation paved the way for harsher immigration laws to come. On the other hand, the strong reaction from the Hispanic community and immigration advocates propelled a drive for naturalization of legal residents and created as many as one million new voters.

  • The Worst: Arizona SB 1070

    The Arizona Act made it a misdemeanor for an undocumented immigrant to be within the state lines of Arizona without legal documents allowing their presence in the U.S. This law has been widely criticized as xenophobic and for encouraging racial profiling. It requires state authorities to inquire about an individual's immigration status during an arrest when there is "reasonable suspicion" that the individual is undocumented. The law would allow police to detain anyone who they believe was in the country illegally. <strong>Status:</strong> The law was signed into law by Arizona Governor Jan Brewer on April 23, 2010. But it has generated a swirl of controversy and questions about its constitutionality. A federal judge issued a ruling that blocked what critics saw as some of the law's harshest provisions. House: 35-31 (4/12/2011)

  • Following Arizona's Footsteps: Georgia HB 87

    The controversy over Arizona's immigration law was followed by heated debate over Georgia's own law. HB 87 required government agencies and private companies to check the immigration status of applicants. This law also limited some government benefits to people who could prove their legal status. <strong>Status:</strong> Although a federal judge temporarily blocked parts of the law considered too extreme, it went into effect on July 1st. 2011. House: 113-56 Senate: 39-17

  • Verifying Authorized Workers: Pennsylvania HB 1502

    This bill, which was approved in 2010, bans contractors and subcontractors employ undocumented workers from having state construction contracts. The bill also protects employees who report construction sites that hire illegal workers. To ensure that contractors hire legal workers, the law requires employers to use the identification verification system E-verify, based on a compilation of legally issued Social Security numbers. <strong>Status:</strong> Approved on June 8th 2010. House: 188-6 (07/08/2010) <a href="http://www.flickr.com/photos/donkeyhotey/" target="_hplink">Flickr photo by DonkeyHotey</a>

  • A Spin Off of Arizona: Utah HB 497

    Many states tried to emulate Arizona's SB 1070 law. However, most state legislatures voted against the proposals. Utah's legislature managed to approve an immigration law based on a different argument. Taking into consideration the criticism of racial profiling in Arizona, Utah required ID cards for "guest workers" and their families. In order to get such a card workers must pay a fee and have clean records. The fees go up to $2,500 for immigrants who entered the country illegally and $1,000 for immigrants who entered the country legally but were not complying with federal immigration law, <a href="http://articles.latimes.com/2011/mar/06/nation/la-na-illegal-immigration-20110306" target="_hplink">according to the LA Times.</a> <strong>Status: </strong> Law went into effect on 03/15/2011 House: 59-15 (03/04/2011) Senate: 22-5 (03/04/2011)

  • The Most Comprehensive: Florida HB-1C

    Florida's immigration law prohibits any restrictions on the enforcement of federal immigration law. It makes it unlawful for undocumented immigrants within the state to apply for work or work as an independent contractor. It forbids employers from hiring immigrants if they are aware of their illegal status and requires work applicants to go through the E-verify system in order to check their Social Security number. <strong>Status: </strong>effective since October 1st, 2010

  • The Hot Seat: Alabama HB 56

    The new immigration law in Alabama is considered the toughest in the land, even harder than Arizona's SB 1070. It prohibits law enforcement officers from releasing an arrested person before his or her immigration status is determined. It does not allow undocumented immigrants to receive any state benefit, and prohibits them from enrolling in public colleges, applying for work or soliciting work in a public space. The law also prohibits landlords from renting property to undocumented immigrants, and employers from hiring them. It requires residents to prove they are citizens before they become eligible to vote. The law asked every school in the state to submit an annual report with the number of presumed undocumented students, but this part, along with others, were suspended by federal courts. <strong>Status:</strong> Approved June 2nd, 2011 House: 73-28 (04/05/2011) Senate: 23-11 (05/05/2011) <a href="http://www.flickr.com/photos/longislandwins/" target="_hplink">Flickr photo by longislandwins</a>