But the movement?s success here could prove difficult to replicate. Twenty-nine states have constitutional bans on same-sex marriage, while 12 others have laws against it. And many of those states where support for same-sex marriage is high have already acted on the issue.

Officials at several gay-rights organizations said they would seek to move quickly in Maryland, where legislation to legalize same-sex marriage was shelved in February by Democratic leaders concerned that it lacked the support to pass.

Advocates also said they hoped to resuscitate a marriage bill that died in the Rhode Island legislature this year.

Gay-rights groups are likely to seek ballot initiatives next year to overturn bans on same-sex marriage in Maine, where the Legislature approved a same-sex marriage law in 2009 that voters almost immediately turned back, and in Oregon.

Advocates hope, in the longer term, to win the legalization of same-sex marriage in Delaware and New Jersey, two states where Democrats control the legislatures, as well as in Pennsylvania.

?The fundamental issue here is American public opinion,? said Fred Sainz, a spokesman for the Human Rights Campaign, a national gay-rights organization. ?The outcome in New York will be tremendously impactful in shaping the rest of the debate.?

The vote on Friday in New York, home of the nation?s economic and cultural capital, carries enormous symbolic importance for the same-sex-marriage movement, particularly after its defeat, with Proposition 8, three years ago in California.

New York is now the sixth and largest state in the country where gay couples will be able to wed legally; when the state?s law goes into effect in late July, twice as many Americans will live in jurisdictions where same-sex marriage is permitted.

But beyond symbolism, gay-rights advocates said that New York had provided them with a new political model.

?They?ve shown a way to actually get a bill through a Legislature,? said Richard S. Madaleno Jr., a Democratic state senator in Maryland and sponsor of the marriage bill that was shelved. ?And I think we?re going to use some of the same lessons, the same tactics, in Maryland over the next six months.?

Mr. Madaleno, in a telephone interview on Saturday, said Maryland gay-rights advocates had failed to mount the kind of vigorous, multimillion-dollar grass-roots campaign that their allies in New York ran this spring. Nor had they pressed the state?s Democratic governor, Martin O?Malley, to deploy his own political capital and muscle on their behalf, as Gov. Andrew M. Cuomo did in New York.

?We had not done as good a job beating the bushes in districts as they did in New York,? Mr. Madaleno said. ?Our hope is that not only will our legislature take a cue from our colleagues in Albany, but that our governor might as well.?

Perhaps the most striking shift in Albany was the role played by Republican lawmakers in the State Senate. Republican senators voted unanimously against same-sex marriage two years ago, when they were in the minority; this year, with a majority in the chamber, they not only allowed the marriage bill to come to the floor, but also provided the final votes necessary to approve it. The decision by 4 Republicans to join 29 Democrats to push the measure through the 62-seat Senate marked the first time in the nation that a legislative body controlled by Republicans approved either same-sex marriages or civil unions, advocates said.

That shift was precipitated by the emergence of a growing constituency of pro-gay-marriage operatives and donors in the Republican Party, whose direction on social issues is still largely set by its culturally conservative base.

?There is an important change going on among Republicans and conservatives,? said Kenneth B. Mehlman, a former chairman of the Republican National Committee.

Mr. Mehlman, who acknowledged his own homosexuality after his tenure at the national committee had ended, was among a group of Republicans who helped raise money from prominent Republican donors to support the same-sex marriage effort in Albany. Those donors underwrote much of the cost of the same-sex marriage advocates? advertising and lobbying campaigns.

Among increasing numbers of conservatives and Republicans, he said, there is the conviction ?that freedom to marry is consistent with conservative values.?