The New York state senate approved a same-sex marriage bill, a powerful victory for gay rights advocates that makes New York the most populous US state where gay marriage will be allowed.
Cheers erupted in the galleries when the Republican-controlled senate voted 33-29 on the "Marriage Equality Act," finally approved after weeks of intense wrangling. The 29 Democratic senators were joined by four Republicans, one more than the minimum needed to get the bill approved.
The measure is on its way to become law, as the Democratic-majority lower house, the state assembly, earlier approved a similar version. New York Governor Andrew Cuomo, who introduced the bill, has said he will sign it into law.
"Democracy works when the people speak. And the people spoke in volumes over these past few months. And this legislature responded this week to their calls," Cuomo said soon after the vote.
"What we accomplished this evening with marriage equality really in some ways brings it all home. Because this state, when it is at its finest, is a beacon for social justice."
Gay activists chanted and danced in the streets of New York city -- especially in the East Village, Greenwich Village and the West Village -- as news of the vote spread.
The measure's approval coincides with the beginning of an annual weekend event celebrating gay pride in New York, which culminates with a giant parade on Sunday.
The Republican-dominated senate had rejected a similar bill in December 2009, and its approval was uncertain leading up to the vote.
In the state capital Albany, where the vote took place, people supporting and opposing the measure packed the senate galleries and demonstrated inside and outside the building.
New York state lawmakers, who should have recessed late Monday, have been in drawn-out negotiations since, in an extraordinary session to put finishing touches on the bill's language designed to address legal protections for religious organizations.
New York is the third most populous US state after California and Texas, and will become the sixth state to approve gay marriage after Iowa, New Hampshire, Massachusetts, Connecticut and Vermont.
Hawaii, California, Nevada, Oregon and New Jersey, as well as the US capital Washington, offer civil unions to same-sex couples, but not marriage rights.
A March poll found that a 53 percent majority of Americans are in favor of allowing gay marriage.
The New York Civil Liberties Union applauded the approval. "This historic, bipartisan vote is a victory for families and a victory for human rights. Now, all loving couples in our state can enjoy the dignity, respect and legal rights that marriage provides," said the group's executive director Donna Lieberman.
The Log Cabin Republicans, a group representing gay members of the Republican Party, congratulated the party members that voted in favor of the bill.
"Republicans in the New York state senate stood up for true conservative values: individual liberty, personal freedom and equal rights for all, and we thank them for voting on the right side of history," said Gregory Angelo, the head of the group's New York state chapter.