Albany, N.Y. -- Cheers filled the New York State Capitol on Friday evening after Republican senators agreed to allow a public vote that could legalize same-sex marriage in New York.

Thirty-one senators support the bill; one more vote is needed. Supporters and even some senators opposing the bill have said in recent days they believe the votes are there for passage.

After meeting behind closed doors for nearly all of the work day, Republicans and Majority Leader Dean Skelos -- who control what legislation comes to the floor -- issued a written statement promising a vote.

"After many hours of deliberation and discussion over the past several weeks among the members, it has been decided that same-sex marriage legislation will be brought to the full Senate for an up or down vote," Skelos, R-Rockville Centre, said in the statement.

Amid cheers, the Assembly passed the religious exemptions by a vote of 82-48. The chamber passed the main gay marriage bill a week ago.

There is no scheduled time for the vote. Lawmakers first took up a economic package of issues involving property taxes, Downstate rent regulations and university tuition hikes.

Supporters and opponents of same-sex marriage have packed the Senate viewing galleries since noon, waiting in line for a seat to history. New York would be the six and largest state to legalize same-sex marriage.

Deputy Majority Leader Thomas Libous of Binghamton, who opposes gay marriage, told The Associated Press that after hours of passionate debate behind closed doors he still doesn’t know if there are enough votes to pass the bill.

“We’ve had some great conferences and nobody was told to vote yes or no,” he said. “People spoke from their hearts.”

One of the Republican senators thought to be open to voting for the bill announced that he would oppose it, The New York Times reported. Sen. Andrew J. Lanza, of Staten Island, who had been heavily lobbied by gay rights advocates and Cuomo, said he believed the word marriage should “describe a union between a man and a woman.”

“Calling a union between a man and a woman marriage, and one between a man and man a civil union, does not invalidate one or the other,” he said in a statement.

Earlier in the day, Skelos, Assembly Speaker Sheldon Silver, D-Manhattan, and Gov. Andrew Cuomo agreed to language that would carve out further protections for religious institutions and non-profit organizations with religious affiliations.

The Assembly already passed a version of the same-sex marriage bill last week. They will have to pass the Senate's version as well.

Staff writer Teri Weaver and The Associated Press contributed to this report.

The NY state Senate will vote on the Same-Sex Marriage bill Friday night.