WASHINGTON (AP) — Senate passage of historic immigration legislation offering a chance at citizenship for millions living in the country illegally looks near-certain after the bill cleared a key procedural hurdle with votes to spare.

A final vote in the Senate on Thursday or Friday would send the issue to the House of Representatives, where conservative Republicans in the majority oppose citizenship for anyone living in the country illegally.

The bill aims at overhauling an immigration system that even critics of the legislation agree needs reform.

Immigration reform is possibly President Barack Obama's best chance at a major domestic accomplishment during his second term, following setbacks for his administration on gun control and fiscal issues.

But with Republicans divided on the issue, the immigration bill faces a tough battle in the House of Representatives, even if it passes in the Senate later this week.

Many Republicans say the immigration bill offers the party a chance to show a more welcoming face to Hispanic voters, an increasingly vital constituency that largely supported Obama and the Democrats in the November elections. But many conservative Republicans in the House majority assail the bill as amnesty for those who have violated the law.

Republican Rep. Paul Ryan said Tuesday that the Senate's advancement of stronger border security measures makes it "even more likely" that immigration reform will pass the House and become law. He said that the House won't take up the Senate bill but will do its own legislation, and added, "the majority of Republicans support the border security" as the keystone of immigration reform. He spoke on CBS' "This Morning."

"Now is the time to do it," Obama said Monday at the White House before meeting with nine business executives who support a change in immigration laws. "I hope that we can get the strongest possible vote out of the Senate so that we can then move to the House and get this done before the summer break" beginning in early August.

House Minority Leader Nancy Pelosi said Tuesday she thinks it's important for the House to have its own bill and said, "Let's be optimistic about it."

Pelosi told CNN she thinks it has an excellent chance of passing there because Republican lawmakers are the party's poor showing with Hispanic voters in last year's presidential election "sends an eloquent message" to them.

Obama's prodding came several hours before the Senate voted 67-27 to advance the measure over a procedural hurdle. The tally was seven more than the 60 needed, with 15 Republicans joining Democrats in voting yes, to overcome a procedural hurdle and move toward a final vote on legislation at the top of Obama' s second-term domestic agenda. Senate Democrats were unified on the vote.

"I think we're building momentum," said Sen. Bob Corker, who worked with fellow Republican Sen. John Hoeven on an amendment with security improvements that helped bring more Republicans on board by doubling the number of border patrol agents and calling for hundreds of miles (kilometers) of new fencing along the border with Mexico. Those changes brought border security spending in the bill to $46 billion.

At its core, the Senate bill would create a 13-year pathway to citizenship for an estimated 11 million immigrants living illegally in the United States.

The measure also would create a new program for temporary farm laborers to come into the country, and another for lower-skilled workers to emigrate permanently. At the same time, it calls for an expansion of an existing visa program for highly-skilled workers, a gesture to high-tech companies that rely heavily on foreigners.

In addition to border security, the measure phases in a mandatory program for employers to verify the legal status of potential workers, and calls for a separate program to track the comings and goings of foreigners at the nation's seaports and airports.