Advocates focused their fury on several Democrats on the Judiciary Committee, which considered more than 300 amendments to the bill, after the senators warned the chairman, Patrick J. Leahy of Vermont, that they would not vote for an amendment he wanted to introduce. The measure by Mr. Leahy, also a Democrat, would have allowed American citizens to seek permanent resident status — a document known as a green card — for a foreign same-sex partners. But as the bill now moves to the Senate floor, the political damage from the episode for the Democrats — including senators who have been firm allies of gay causes like Mr. Leahy, Charles E. Schumer of New York and Richard J. Durbin of Illinois — may not be as severe as it first appeared. Gay rights advocates, stepping back from the loss, said the overhaul still contained many measures that could benefit gay immigrants, most of which came through the committee gantlet unscathed. Other provisions that the committee agreed to add to the bill, dealing with asylum and immigration detention, had been the subject of vigorous lobbying by gay organizations. The committee outcome was a relief for Republicans in the bipartisan group of eight senators that wrote the bill, who had said the same-sex amendment would cripple the entire measure. By fending it off, Republicans held on to crucial support from evangelical Christians and Roman Catholics. “To try to redefine marriage within the immigration bill would mean the bill would fall apart,” Senator Lindsey Graham of South Carolina, a Republican, told Mr. Leahy in the moments of high suspense last Tuesday evening before the Vermont senator announced his decision. Mr. Graham said support from conservative evangelical churches, which have put on an ambitious campaign to pass the overhaul, “made it possible for a guy like me to survive the emotional nature of this debate.” One activist who had intensely mixed feelings about the committee’s results was Felipe Sousa-Rodriguez, co-director of Get Equal, an organization that seeks legal equality for gay people. “I can’t deny my outrage when I felt betrayed,” said Mr. Sousa-Rodriguez, who said he had delivered thousands of petitions to Mr. Schumer’s Washington office just a week earlier. But he said he was ready to push for the bill on the Senate floor, where lawmakers expect to take it up the week of June 10. “Many of my friends will benefit from the overall legislation,” he said. Like many gay advocates, Mr. Sousa-Rodriguez, who was born in Brazil, sees the legislation from several angles. He is one of as many as 1.7 million young immigrants who were brought here illegally as children. Those immigrants would be eligible under the Senate bill for an accelerated five-year path to citizenship. They include a vocal contingent of youths who are gay. But Mr. Sousa-Rodriguez is also legally married to an immigrant from Colombia, Juan, who is about to become an American citizen. If the same-sex amendment were to become law, Mr. Sousa-Rodriguez’s husband could seek a green card for him immediately, without waiting five years. In the Judiciary Committee debate, Mr. Leahy kept everyone, including his own staff, wondering until the final hour whether he would formally introduce the same-sex amendment. He had sponsored similar legislation many times in the Senate, and he left no doubt in his opening statement about his strong support for the provision. But then he turned to the other senators on the committee, asking them for their views. In agonized comments the Democrats, also including Dianne Feinstein of California and Al Franken of Minnesota, replayed the Republican warnings that the measure would be a deal breaker. According to several Senate aides, the Democrats were surprised and miffed that Mr. Leahy shifted the burden to them to nix the amendment. “He did it in a way that made others walk the plank and kept his hands clean,” one Democratic aide said, “and that was not appreciated.” In the end Mr. Leahy withheld his amendment, leaving open the option of introducing it later. The committee sent the bill to the Senate floor on a strong bipartisan vote.