Gay rights supporters have been campaigning across the US
Lawmakers in New York state have rejected a bill that would have granted marriage rights to gay couples.
The state's senate voted against the legislation by 38 votes to 24. Several Democrats opposed the measure.
The bill legalising same-sex marriage had earlier passed easily in the heavily Democratic state assembly.
Gay rights activists had hoped New York would join Connecticut, Massachusetts, Iowa, New Hampshire and Vermont in legalising gay unions.
Gay marriage is a controversial issue in the US, where many states have statutes banning same-sex unions.
Voters in Maine repealed their state law legalising gay marriage only last month. And last year, Californians also overturned an earlier decision by the state's Supreme Court to allow gay couples to wed.
The Democratic governor of New York, David Paterson, had supported the bill, saying he would sign it if the senate were to pass it.
Gay rights activists will now turn their attention to New Jersey, where they hope to push through legislation allowing same-sex unions before Democratic Governor Jon Corzine - who supports the law - leaves office.
He will hand over to Republican Chris Christie, who opposes the legislation.