Updated

The Senate on Thursday approved a far-reaching immigration bill that includes a controversial program that would allow millions of illegal immigrants already living and working in the United States a new chance at legal residency and a portion of them a chance a citizenship. It also provides heightened border security measures.

But the Senate bill, which passed 62-36, differs greatly from a House measure passed last December, meaning the legislative outcome remains unclear after months of debate and a number of false starts. Before President Bush can sign any reforms into law, the House and the Senate will have to negotiate an agreement on the two versions of the bill.

Click here to see how your senator voted.

Despite White House efforts, conservative House Republicans not only are expressing deep concern over the guest worker program — calling it amnesty for lawbreakers — but they also have problems with the cost of the bill and differ over many specifics including the size and scope of border security measures, and how strict criminal rules on illegal immigrants and their employers should be.

"This is a success for the American people. It is a success for people who hope to one day participate in the American Dream," Senate Majority Leader Bill Frist of Tennessee said after the vote.

Senate Minority Leader Harry Reid of Nevada aded: "This bill is good for security in this country. ... We have a guest worker program in this country that's meaningful." He also said will the bill bring illegal workers "out of the shadows."

Opponents were not as optimistic.

"This legislation I think is well outside of what I would consider responsible reform. It's misfocused. It puts the cart before the horse," said Sen. Rick Santorum, R-Pa., who voted against the final bill.

Lawmakers joining their leaders in the Senate press briefing room pointed immediately to the challenges facing them in the coming negotiations with the House.

"There are big differences between the House and the Senate bill," Sen. Arlen Specter, R-Pa., said. He called for "very active participation by the president," and said he hoped Bush would "put a very heavy shoulder to the wheel."

Nevertheless, he said: "I predict success."

Sen. Patrick Leahy, D-Vt., did not give the bill as great of a chance, saying he believed there remains a 50-50 chance of survival for their package.

Speaking to members of the House, Sen. John McCain said: "We will listen to you and we hope you will listen to us with respect, and we know that we can work with us."

The lawmakers were joined by a number of others, including Sens. Chuck Hagel, R-Neb., and Mel Martinez, D-Fla., who with McCain and Sen. Ted Kennedy, D-Mass., brokered the deal over the guest worker program that was the basis for Thursday's bill. The amendment sets a tiered approach to those who are eligible for citizenship and guest programs.

Frist credited Hagel and Martinez with their amendment "that reflects the opinions and the spirit" of the Senate, as well as overcoming disputes that allowed the bill to come to the final vote

Click here for the FOXNews.com Immigration Center

The Senate's guest-worker program would allow many of the estimated 12 million illegal immigrants currently living in the United States to stay and work here legally, and give a portion of those workers a chance at citizenship. The bill also would increase funding for other border security measures like surveillance technology and manpower.

Bush has supported a guest, or temporary worker program since the beginning of his administration, but many, including conservative Republicans on Capitol Hill, say they will not approve any immigration bill that gives amnesty to illegal immigrants and a free pass to citizenship. Bush and others have argued that the plan, which has received a colder reception in the House than the Senate, is not the equivalent of amnesty.

The House-passed version of an immigration bill focuses heavily on border security and would make most illegal immigrants felons. The House bill has no provision for a guest worker program.

And while the Senate has reduced the size of the guest worker program in recent days through amendments, House conservatives say they still are not satisfied.

White House spokesman Tony Snow on Thursday told reporters that with an approved bill, Congress would come out looking better than if they reached no agreement, something that could make a difference in an election year where Republicans are struggling to maintain majority.

"It's pretty clear that members of both houses understand that they pay a heavier political price for failing to act than for acting. ... That's one thing I've heard from Republicans in both houses," Snow said.

Amendments passed in recent days would build 370 miles of fence along the Southwest border; allow illegal immigrants who qualify to stay to receive Social Security benefits they may have earned while living here illegally; and recognize English as the "national" language, as well as make it the "common and unifying" language.

The Senate took up the last few amendments to its plan Thursday before its final vote, which was nearly a foregone conclusion after a test vote Wednesday to limit debate on the bill passed by a 73-25 margin.

On Thursday, lawmakers narrowly agreed to an amendment from Sen. Jeff Bingaman, D-N.M., that would limit the total number of aliens, including those allowed to work and their family members, to 650,000 during any given fiscal year. That measure passed by a vote of 51-47.

The Senate also agreed to an amendment pushed by Sen. Russ Feingold, D-Wis., that would change the standard for appealing a deportation order. It was agreed to by a vote of 52-45.

An amendment form Sen. John Ensign, R-Nev., passed 50-47, would prevent illegal immigrants later granted legal status from receiving earned income tax credits for any taxes paid while they were working illegally.

A package of amendments bundled together — known as a "manager's amendment" — also was voted on just before the final bill went to passage. It was not immediately clear what was in the bill, Sen. John Kyl, R-Ariz., said, which is why he voiced opposition to the package.

He said that among the amendments was language that would require discussion with the Mexican government prior to construction of border fencing, get local community input and foster cooperation between the two nations.

He said that while he supports goodwill between the two countries, "I don't think it's necessary for us to put a precondition for the construction of any fencing," Kyl said.

As he introduced the package of amendments, Specter said wryly: "The manager's package makes sausage look very good." The measure passed 56-41, and one member voting "present."

Expressing concerns in the House over immigration, Rep. John Shadegg, R-Ariz., on Wednesday said: "I think there is strong sentiment in the House that passing a bad bill, a bill that sets policies that will hurt America, a bill that has not been fully thought through that Americans aren't aware of would be worse than passing no bill at all."

"We've got a lot of negotiating we're going to do with the House of Representatives, and I think you're going to have to be able to credibly say we're doing these specific measures to secure the border," Brownback told FOX News.

"Now can somebody certify it's going to be a sealed border? I don't know that you're ever going to be able to certify it's a sealed border unless you're willing to put guards up there that start shooting at people. That's a very high standard to be able to meet."

Opponents made a last-ditch attempt on Wednesday to derail the bill, contending it violated spending limits. Sen. Jeff Sessions, R-Ala., said the bill would bust the budget. Supporters countered that immigrants will be working and contributing more than they will cost.

"The economy is as good as it's ever going to get in your lifetime," said Sen. Lindsey Graham, R-S.C. The estimated 12 million immigrants in the country have assimilated into the economy "and it's humming," he said. The effort was defeated 67-31.

Rep. Bill Shuster, R-Pa., told FOX News on Thursday that he had similar concerns after being asked whether the bill could be a budget-buster.

"That certainly is possible that it will bust the budget. I think what we need to do is take the House bill up, which has tremendous support throughout America, and especially in my district. What we do is we enforce the laws of this land when we get control on our borders, shutting our border down to stop the flow" of illegal immigrants, Shuster said.

Sen. John Cornyn, R-Texas, voted against the bill, but said problems with it can be settled in negotiations with the House.

"Failure is really not an option," said Cornyn, who will be one of the negotiators. "I think we've got to come up with a bill that addresses the American people's concerns."

Frist said he was confident the compromise that emerges from House and Senate talks will be followed by the necessary money. He said the failure of the 1986 immigration reform law actually would help today because it would reinforce the need for adequate financing, particularly for enforcement.

As the bill moved ahead, Mexican President Vicente Fox spoke to legislators in Utah and farm workers, farm owners and business people in Washington state. Fox's message was that the U.S. and Mexico must fix immigration problems together.

The Bush administration is still trying to massage the House over its differences. On Wednesday, presidential aide Karl Rove met with House members.

Asked as he departed the Capitol whether he had made progress, he replied, "Could be."

If the Senate or the president insist on "an amnesty-type path to citizenship, it's a nonstarter," said former House Majority Leader Tom DeLay, R-Texas, who is leaving Congress June 9.

But Rep. Mike Pence, R-Ind., who heads a group of 100 conservatives in the House, on Tuesday offered his own immigration bill that combines a guest worker program with the House enforcement measure.

Rep. James Sensenbrenner, R-Wis., the House Judiciary Committee chairman, has insisted that Bush's view and the Senate proposal amount to amnesty. But he left the door open to make a deal. Sensenbrenner was the original sponsor of the measure that passed the House in December.

Also Wednesday, the Senate voted 56-42 to set aside two-thirds of 50,000 visas granted annually by lottery, largely to immigrants in African countries, for people with advanced degrees.

Senators also tacked on additional fees for illegal immigrants for the legalization program, raising total fees and fines to more than $3,200.

FOXNews.com's Greg Simmons and the Associated Press contributed to this report.