Lawmakers voted late Friday to legalize same-sex marriage, making New York the largest state where gay and lesbian couples will be able to wed and giving the national gay-rights movement new momentum from the state where it was born.
The marriage bill, whose fate was uncertain until moments before the vote, was approved 33 to 29 in a packed but hushed Senate chamber. Four members of the Republican majority joined all but one Democrat in the Senate in supporting the measure after an intense and emotional campaign aimed at the handful of lawmakers wrestling with a decision that divided their friends, their constituents and sometimes their own homes.
With his position still undeclared, Senator Mark J. Grisanti, a Republican from Buffalo who had sought office promising to oppose same-sex marriage, told his colleagues he had agonized for months before concluding he had been wrong.
“I apologize for those who feel offended,” Mr. Grisanti said, adding, “I cannot deny a person, a human being, a taxpayer, a worker, the people of my district and across this state, the State of New York, and those people who make this the great state that it is the same rights that I have with my wife.”
Senate approval was the final hurdle for the same-sex marriage legislation, which was approved last week by the Assembly. Gov. Andrew M. Cuomo signed the measure at 11:55 p.m., and the law will go into effect in 30 days, meaning that same-sex couples could begin marrying in New York by late July.
Passage of same-sex marriage here followed a daunting run of defeats in other states where voters barred same-sex marriage by legislative action, constitutional amendment or referendum. Just five states currently permit same-sex marriage: Connecticut, Iowa, Massachusetts, New Hampshire and Vermont, as well as the District of Columbia.