ALBANY, N.Y. - Republicans in the New York Senate agreed Friday to allow a full vote on legalizing gay marriage, setting the stage for a possible breakthrough victory for the gay-rights movement in the state where it got its start.

New York could become the sixth state where gay couples can wed, and the biggest by far. A vote could come as soon as tonight.

Senate Majority Leader Dean Skelos released a statement announcing the bill would go to the Senate for an up or down vote. "As I have said many times, this is a very difficult issue and it will be a vote of conscience for every member of the Senate."

The heavily Democratic Assembly has already approved one version of the measure and is expected to easily pass the new version, which contains more protections for religious groups that oppose gay marriage and feared discrimination lawsuits.

Even State Conservative Party Chairman Mike Long, perhaps New York's most powerful opponent to same-sex marriage, told the Weekly Standard that he was fairly certain the measure would pass.

"I know they've got the 32nd vote, and I think they've muscled two more people" for the vote. "Hopefuly all of that blows up [but] I don't see that happening."

Democratic Gov. Andrew Cuomo, who campaigned on the issue last year, has promised to sign it. Gay weddings could begin 30 days after that.

Gay marriage activists were jubilant and applauded Skelos, who is opposed to gay marriage, for keeping his promise to let the conference decide whether to send the bill to the floor.

Though New York is a relative latecomer in allowing gay marriage, it is considered an important prize for advocates, given the state's size and New York City's international stature and its role as the birthplace of the gay-rights movement, which is said to have started with the Stonewall riots in Greenwich Village in 1969.

The effects of the law could be felt well beyond New York: Unlike Massachusetts, which pioneered gay marriage in 2004, New York has no residency requirement for obtaining a marriage license, meaning the state could become a magnet for gay couples across the country who want to have a wedding in Central Park, the Hamptons, the romantic Hudson Valley or that honeymoon hot spot of yore, Niagara Falls.

Gay-rights advocates are hoping the vote will galvanize the movement around the country and help it regain momentum after an almost identical bill was defeated here in 2009 and similar measures failed in 2010 in New Jersey and this year in Maryland and Rhode Island.

The sticking point over the past few days: Republican demands for stronger legal protections for religious groups that fear they will be hit with discrimination lawsuits if they refuse to allow their facilities to be used for gay weddings. Now, all 32 Republicans have approved stronger religious protections.

Several senators said they didn't know from discussion inside a closed conference Friday afternoon whether the bill would pass. Senators had agreed not to comment on discussions in the caucus and to allow Skelos to speak for them.

New York, the nation's third most populous state, would join Connecticut, Iowa, Massachusetts, New Hampshire, Vermont and Washington, D.C., in allowing same-sex couples to wed.

For five months in 2008, gay marriage was legal in California, the biggest state in population, and 18,000 same-sex couples rushed to tie the knot there before voters overturned the state Supreme Court ruling that allowed the practice. The constitutionality of California's ban is now before a federal appeals court.

While court challenges in New York are all but certain, the state -- unlike California -- makes it difficult for the voters to repeal laws at the ballot box. Changing the law would require a constitutional convention, a long, drawn-out process.

Movement on the bill comes after more than a week of stop-and-start negotiations, rumors, closed-door meetings and frustration on the part of advocates.

Online discussions took on a nasty turn with insults and vulgarities peppering the screens of opponents and supporters alike and security was beefed up in the capitol to give senators easier passage to and from their conference room.

Despite New York City's liberal Democratic politics and large and vocal gay community, previous efforts to legalize same-sex marriage failed over the past several years, in part because the rest of the state is more conservative than the city.

If the bill succeeds this time, it would reflect the powerful support of New York's new governor, who lobbied hard for the measure, and perhaps a change in public attitudes. Opinion polls for the first time are showing majority support for same-sex marriage, and Congress recently repealed the "don't ask, don't tell" policy that barred gays from serving openly in the military.

In the weeks leading up to the action in New York, some Republicans who opposed the bill in 2009 came forward to say they were supporting it for reasons of conscience and a duty to ensure civil rights.

Pressure to vote for gay marriage also has come from celebrities, athletes and New York City Mayor Michael Bloomberg, the Republican-turned-independent who has long used his own fortune to help bankroll GOP campaigns and who personally lobbied some undecided lawmakers. Lady Gaga has been urging her 11 million Twitter followers to call New York senators in support of the bill.

Representatives of the Roman Catholic Church, Orthodox rabbis and other conservative religious leaders are fighting the measure, and their GOP allies have pressed hard for legal protections for religious organizations that object to gay marriage.

Each side of the debate was funded by more than $1 million from national and state advocates who waged media blitzes and promised campaign cash for lawmakers who sided with them.

But GOP senators said it was Cuomo's passionate appeals in the governor's mansion on Monday night and in closed-door, individual meetings that were perhaps most persuasive.

The bill would make New York only the second state, after Vermont, to legalize marriage through a legislative act and without being forced to do so by a court.

WATCH LIVE: