Nevertheless, Senator Harry Reid of Nevada, the Democratic majority leader, scheduled another, make-or-break cloture vote for this evening. If that vote also falls short, Mr. Reid is expected to shelve the bill, meaning that changes in immigration law might not be considered again for many months.
Senator Edward M. Kennedy, Democrat of Massachusetts and an architect of the bill, vowed to work “all day long” to muster support for this evening’s vote. The day-long debate offered the bill’s opponents a chance to be heard yet again and leave their mark on the bill with amendments.
The midday move to end debate failed chiefly because a significant number of conservative Republicans wanted more time to offer amendments to make the measure more to their liking.
“We are not there yet,” said Senator Mitch McConnell of Kentucky, the Republican minority leader.
“It is not yet ready,” said another Republican, Senator Kay Bailey Hutchison of Texas.
Some 12 hours before the noontime cloture vote, the bill’s supporters suffered a setback when the Senate voted to put a five-year limit on a new guest worker program that would be created under the legislation. By a vote of 49 to 48 shortly after midnight, the Senate approved the limit, in the form of an amendment by Senator Byron L. Dorgan, Democrat of North Dakota.
The temporary worker program is an important element of the “grand bargain” on immigration forged in three months of negotiations by a small group of senators from both parties.
If the Senate votes this evening to end debate, the bill will have cleared a major hurdle — but by no means the last one. The House has yet to take up its version of the immigration legislation, and it has generally been much less sympathetic to the plight of immigrants and more inclined to beef up border security than the Senate.
The Senate bill, which embodies a fragile compromise strongly supported by the president, would offer most of the estimated 12 million illegal immigrants in the United States the chance to obtain legal status. It calls for the biggest changes in immigration law in more than two decades.
Supporters contend that it would address the problem of millions of illegal aliens without giving them amnesty; that it will further secure the nation’s borders, and that through its guest-worker program it will help immigrants and American employers. Its opponents have argued that there are far too many deficiencies in its nearly 400 pages.
The vote on Mr. Dorgan’s amendment was a surprise because the Senate had previously rejected a similar proposal.
Employers say they want to hire foreign workers because they cannot find Americans to fill all the jobs in hotels, restaurants, nursing homes, hospitals and the construction industry.
But Mr. Dorgan said, “The main reason that big corporations want a guest worker program is that it will drive down U.S. wages.”
Senator John McCain, Republican of Arizona, a co-author of the Senate bill, denounced Mr. Dorgan’s proposal as “an attempt to kill the legislation.”
On Wednesday, the Senate signaled support for other provisions of the immigration bill by rejecting many proposed amendments, including one that would have made it much harder for many illegal immigrants to achieve legal status.
Mr. Reid said, “We have made a lot of progress,” adding, “The end really is in sight.”
Senator Jeff Sessions, Republican of Alabama, who opposes the bill, said, “The train is moving down the tracks.”
While senators struggled with the complex legislation, executives from high-tech companies descended on Capitol Hill to express concerns.
Steven A. Ballmer, the chief executive of Microsoft, was among the businessmen pleading with Congress to increase the number of H-1B visas and green cards available to skilled foreign professionals. Ginny Terzano, a spokeswoman for Microsoft, said such visas were urgently needed to help meet “a talent crisis” in the industry.
Two amendments intended to reunify families, by providing additional visas for close relatives of United States citizens and lawful permanent residents, failed on procedural votes. The amendments were offered by Senators Hillary Rodham Clinton of New York and Robert Menendez of New Jersey, both Democrats.
Republicans raised points of order, saying the proposals violated budget rules because they would increase federal spending with no way to offset the costs.
By a vote of 51 to 46, the Senate on Wednesday rejected an amendment proposed by Senator John Cornyn, Republican of Texas, that could have made hundreds of thousands of illegal immigrants ineligible for legal status.
Under Mr. Cornyn’s proposal, gang members, terrorists and other convicted felons would have been permanently barred from the United States and denied immigration benefits. Most significant, the amendment would have denied legal status to illegal immigrants who had flouted deportation orders or been convicted of identity theft or fraudulent use of identification documents.
Mr. Cornyn said his purpose was not to cater to “racists, nativists or know-nothings,” but to exclude “felons who have shown contempt for American law.” But Senator Charles E. Schumer, Democrat of New York, said Mr. Cornyn’s amendment would “gut the bill.” And Senator Edward M. Kennedy of Massachusetts, the chief Democratic architect of the bill, said: “Almost every hard-working immigrant in this country has been forced, at one time or another, to use false documents to get a job.”
Mr. Cornyn said his amendment was a defining issue for presidential candidates. Senator John McCain, Republican of Arizona, a co-author of the overall bill, voted against Mr. Cornyn’s amendment and for a Democratic alternative.
The four senators seeking the Democratic nomination — Joseph R. Biden Jr. of Delaware, Mrs. Clinton, Christopher J. Dodd of Connecticut and Barack Obama of Illinois — also voted against Mr. Cornyn’s proposal.
Senator Sam Brownback of Kansas, a candidate for the Republican presidential nomination, voted for it.
By a vote of 66 to 32, the Senate approved the Democratic alternative, which would increase penalties for illegal immigrants who have been convicted of sex offenses, crimes of domestic violence or the use of firearms in alien-smuggling operations.
In a surprise, the Senate approved another Cornyn amendment that would give law enforcement and intelligence agencies access to information in applications for legal status that are denied. The vote was 57 to 39.
Mr. Cornyn said his proposal would give law enforcement “a critical tool to prevent document fraud and to prosecute those who have broken our immigration laws.”
But Mr. Kennedy said that without the guarantee of confidentiality, illegal immigrants would be extremely reluctant to come forward and apply for legal status.
The Senate rejected a proposal to change the structure of the bill’s guest worker program. Under the program, foreign workers could get two-year visas, which could be renewed twice, but the guest workers would have to leave the United States for a year in between their stays here.
Senator Jeff Bingaman, Democrat of New Mexico, said the requirement for workers to leave the country would “cause enormous instability in the work force.” Mr. Bingaman proposed an amendment to admit guest workers for a maximum of six consecutive years, but the Senate rejected it, 57 to 41.