A proposed immigration overhaul narrowly survived several strong Senate challenges Wednesday, but it suffered a potentially deal-breaking setback early Thursday. Shortly after midnight, the Senate voted 49-48 to end a new temporary worker program after five years. The vote reversed the one-vote outcome on the same amendment - offered both times by Sen. Byron Dorgan (news, bio, voting record), D-N.D. - two weeks ago. Six senators switched their votes, reflecting the issue's political volatility. The temporary worker program is crucial to many business groups, and the bill's backers vowed to try on Thursday to undo the damage. Sen. Arlen Specter (news, bio, voting record), R-Pa., said he or his allies would slightly reword Dorgan's amendment and hope for a change of heart by one or more senators who "don't want to kill the bill." Dorgan, who contends that immigrants take many jobs Americans could fill, said no one in the debate "is talking about the impact on American workers." "There are a lot of people here who want jobs and can't find jobs, and find downward pressure on their incomes," Dorgan said. The vote on his amendment brought a jarring close to a long day that, until then, had pleased proponents of the immigration bill, a priority for President Bush. They first had turned back a Republican bid to reduce the number of illegal immigrants who could gain lawful status. They later rejected two high-profile Democratic amendments. One would have postponed the bill's shift to an emphasis on education and skills among visa applicants as opposed to family connections. The other, offered by Sen. Barack Obama (news, bio, voting record), D-Ill., would have ended a new point system for those seeking permanent resident "green cards" after five years rather than 14 years. All three amendments were seen as potentially fatal blows to the fragile coalition backing the bill, which remains under attack from the right and left. The bill would tighten borders, hike penalties for those who hire illegals, and give many of the country's estimated 12 million illegal immigrants a pathway to legal status. While the Dorgan amendment marked the biggest setback for the bill's advocates, there were others. They failed to defeat a Republican proposal to give law enforcement agents access to rejected visa applications, which could lead to the arrest and deportation of some illegal immigrants who otherwise might escape detection. They also failed, by a 64-33 vote, to block a provision by Sen. James Inhofe (news, bio, voting record), R-Okla., making English "the national language." Opponents called the measure demeaning and said they would try to kill it during House-Senate negotiations. Specter said that, on balance, the coalition's "grand bargainers" felt they had a good day. If the Dorgan measure can be overturned, he said, the bill will be in strong shape. The Senate voted 51-46 to reject a proposal by Sen. John Cornyn (news, bio, voting record), R-Texas, to bar criminals - including those ordered by judges to be deported - from gaining legal status. Democrats siphoned support from Cornyn's proposal by winning adoption of a rival version that would bar a more limited set of criminals, including certain gang members and sex offenders, from gaining legalization. The Senate backed that amendment 66-32. The Senate also rejected a proposal by Sen. Robert Menendez (news, bio, voting record), D-N.J., that bill supporters called a "killer amendment." It would have delayed the bill's shift in favor of attracting foreign workers with needed skills as opposed to keeping families together. Menendez won 53 votes, seven short of the 60 needed under a Senate procedural rule invoked by his opponents. Menendez's proposal would have allowed more than 800,000 people who had applied for permanent legal status by the beginning of 2007 to obtain green cards based purely on their family connections - a preference the bill ends for most relatives who got in line after May 2005. Sen. Jon Kyl (news, bio, voting record), R-Ariz., a chief advocate of the bill, said most of the visa applicants Menendez wanted to help are so far back in line that it would be decades before the Homeland Security Department could process them. The Senate adopted Kyl's alternative, which would retain the family preference status for applicants who might win approval by 2026 under the department's projections. Menendez, whose parents were Cuban immigrants, called the Kyl amendment "a fig leaf" that would make no meaningful change to the bill. Presidential contenders featured prominently in the day's debates. Sen. Hillary R. Clinton, D-N.Y., fell short in her bid to remove limits on visas for the spouses and minor children of immigrants with permanent resident status. Obama called the green card point system a risky "experiment in social engineering." Cornyn had painted his criminals amendment as a "defining issue" for any presidential candidate - a sign of the degree to which the contentious debate is bleeding over into the GOP campaign fray. Sen. John McCain (news, bio, voting record), R-Ariz., alone among his party's presidential aspirants in backing the immigration measure, opposed Cornyn's bid and backed the Democratic alternative offered by Sen. Edward M. Kennedy, D-Mass. McCain was joined in opposing the amendment by the Senate's four Democratic presidential hopefuls: Obama, Clinton, Joe Biden of Delaware and Chris Dodd of Connecticut. Cornyn prevailed on another matter opposed by the grand bargainers, however. His amendment, adopted 57 to 39, would make it easier to locate and deport illegal immigrants whose visa applications are rejected. The bill would have barred law enforcement agencies from seeing applications for so-called Z visas, which can lead to citizenship if granted. Cornyn said legal authorities should know if applicants have criminal records that would warrant their deportation. Opponents said eligible applicants might be afraid to file applications if they believe they are connected to deportation actions. Sen. Dianne Feinstein (news, bio, voting record), D-Calif., said in an interview that Cornyn's amendment was "not a deal-killer" but would have to be changed in House-Senate negotiations. Other amendments defeated Wednesday included a Democratic effort to alter the temporary guest worker program that would be created by the bill. Sen. Jeff Bingaman (news, bio, voting record) of New Mexico wanted to allow workers to come for six consecutive years. The Senate voted 57-41 to reject the amendment, retaining the bill's call for most guest workers to go home for a year between each of three two-year stints. The Senate also rejected an amendment by Sen. Jim DeMint (news, bio, voting record), R-S.C., to change the Z visa program whereby illegal immigrants could gain lawful status. DeMint proposed requiring them to buy high-deductible health plans to be eligible for visas.