WASHINGTON, June 7 —The sweeping immigration overhaul endorsed by President Bush crumbled in the Senate on Thursday night, leaving the future of one of the administration’s chief domestic priorities in serious doubt.

After a day of tension and fruitless maneuvering, senators rejected a Democratic call to move toward a final vote on the compromise legislation after Republicans complained that they had not been given enough opportunity to reshape the sprawling bill. Supporters of cutting off debate got only 45 of the 60 votes they needed; 50 senators opposed the cutoff.

“We are finished with this for the time being,” said Senator Harry Reid, Democrat of Nevada and the majority leader, as he turned the Senate to work on energy legislation.

Mr. Reid did, however, leave the door open to revisiting the immigration issue later this year and said he would continue to explore ways to advance a plan. “We all have to work, the president included, to find a way to get this bill passed,” he said.

The outcome, which followed an outpouring of criticism of the measure from core Republican voters and from liberal Democrats as well, was a significant setback for the president. It came mainly at the hands of members of his own party after he championed the proposal in the hope of claiming it as a major domestic policy achievement in the last months of his administration.

The collapse of the measure came as Mr. Bush was in Europe for an international economic summit, and it was not immediately clear how hard he would fight to resurrect the bill upon his return next week.

Scott Stanzel, a White House spokesman, said the White House still held hope that a bill could be passed.

“We are encouraged that the leadership of both parties in the United States Senate indicated that they would bring this legislation back up for consideration,” Mr. Stanzel said. “And we will continue to work with members of the United States Senate to make sure this process moves forward.”

The defeat was also crushing for a bipartisan group of about a dozen senators who met privately for three months to broker a compromise that tried to balance a call for stricter border enforcement with a way for many of the 12 million people who are illegally in the country to qualify for citizenship eventually.

“The vote was obviously a big disappointment, but it makes no sense to fold our tent, and I certainly don’t intend to,” said Senator Edward M. Kennedy, Democrat of Massachusetts and a chief author of the bill. “Doing nothing is totally unacceptable”

Other proponents said they still saw life in the legislation despite the blow in the Senate.

“This matter is on life support, but it is not dead,” said Senator Arlen Specter, Republican of Pennsylvania and another central architect of the plan.

Senate conservatives fought the legislation from the start, saying it rewarded those who broke the law by entering the country illegally. After winning a few important changes in the measure, Republican critics demanded more time and drew support for their calls for more opportunity to fight it out on the Senate floor.

“I simply do not understand why some of my colleagues want to jam this legislation through the Congress without a serious and thorough examination of its consequences,” said Senator John Cornyn, Republican of Texas.

Senator Jeff Sessions, an Alabama Republican who was another leading opponent, said he believed lawmakers responded to constituent complaints about the flaws in the measure. “I was not going to support a piece of legislation that will not work,” Mr. Sessions said.

Mr. Reid said the critics were simply stalling and would never be satisfied. Noting the Senate had considered more than 40 amendments and held 28 roll call votes, he attributed the failure of the bill to Republican recalcitrance.

In the end, 38 Republicans, 11 Democrats and one independent voted not to shut off debate; 37 Democrats, 7 Republicans and one independent voted to bring the issue to a head.

Senator Mitch McConnell of Kentucky, the Republican leader, said he believed Republicans would have eventually relented had they been given more time to work out an agreement on what amendments would be considered. “I think we are giving up on this bill too soon,” Mr. McConnell said.

The vote was the second attempt of the day to cut off a debate that had gone on for nearly two weeks, interrupted by the Memorial Day recess. On the initial showdown in the morning, the Senate fell 27 votes short of the 60 required; every Republican and 15 Democrats opposed the move.

The morning vote sent Senate leaders and backers of the legislation scrambling, trying to reach an agreement to salvage the measure with the help of administration officials. Homeland Security Secretary Michael Chertoff was also consulted by phone.

The progress of negotiations was uncertain throughout the day. As late as 6:30 p.m., Mr. Kennedy was still uncertain where many senators stood on the call to force an end to the debate. “It’s touch and go,” Mr. Kennedy said. “It’s extremely close at this time. Republicans have held their cards.”

The compromise legislation was announced on May 17 by authors who hailed it as a “grand bargain.” It held together through much of the debate because the negotiators — embodied on the right by Senator Jon Kyl of Arizona, a Republican, and on the left by Mr. Kennedy — agreed to block proposals they thought would sink the measure. That led to such odd moments as when Mr. Kyl on Wednesday opposed an amendment he had helped write for last year’s unsuccessful immigration measure.

But the legislation began running into problems late Wednesday night and early Thursday morning as the Senate approved a Democratic proposal to limit a guest-worker program sought by business interests and backed by Republicans. Backers of the bill hoped to reverse that result if the measure moved forward.

“It is indispensable to have a guest-worker program to take care of the needs of the economy,” said Mr. Specter. “If we don’t, we will just encounter more people coming over illegally.”

At the same time, some Democrats were growing increasingly uneasy.

Senator Robert Menendez, Democrat of New Jersey, said the bill had become “more punitive and more onerous” because of amendments adopted in the last few days. Mr. Menendez pointed, for example, to one that denied the earned-income tax credit to illegal immigrants who gain legal status under the bill.

Cecilia Muñoz, a vice president of the National Council of La Raza, the Hispanic rights group, said she had similar concerns. Changes approved by the Senate this week make the bill “not only more punitive, but also less workable,” Ms. Muñoz said.

Trying to bolster Democratic support, the Service Employees International Union urged senators Thursday to vote for a limit to the debate. In a letter to the Senate, Anna Burger, secretary-treasurer of the union, listed many serious objections to the bill, but said, “The time to move forward is now.”

The Leadership Conference on Civil Rights, a coalition of civil rights groups, also backed cloture, saying, “A small handful of immigration restrictionists’ in the Senate should not be allowed to prolong the debate indefinitely.”

In addition to the limit on the guest worker program, supporters of the bill said they would also try to change an amendment that gives law enforcement and intelligence agencies access to certain information in unsuccessful applications filed by illegal immigrants seeking legal status. Despite the strong Republican vote against ending debate, party leaders said throughout the day they wanted to reach some accommodation. Senator Trent Lott of Mississippi, the No. 2 Republican, urged his colleagues to stiffen their spines and try to resolve one of the nation’s most pressing problems.

“Are we men and women or mice?” Mr. Lott asked. “Are we going to slither away from this issue and hope for some epiphany to happen? No. Let’s legislate. Let’s vote.”

Jim Rutenberg contributed reporting from Midland, Tex.

A version of this article appears in print on , on Page A1 of the New York edition with the headline: Immigrant Bill, Lacking 15 Votes, Stalls in Senate. Order Reprints|Today's Paper|Subscribe