The 20-to-14 vote in a Democratically controlled state Senate shows the difficulty of legalizing gay marriage by legislation.
The 38-to-24 vote in the New York state Senate is a fresh and stinging defeat for gay marriage, which was also recently rejected in Maine. Now, the New Jersey legislature might take up this issue.
DC councilors voted Tuesday on the gay-marriage measure, but another vote will take place in the coming weeks. Congress could also intervene.
Maine voters on Tuesday voted down a law that would have legalized gay marriage in the state. It became the 31st state to reject gay marriage at the ballot box.
No state has ever approved gay marriage at the polls. Gay marriage advocates and opponents have poured into Maine in an effort to either break the streak or keep it intact Tuesday.
One of the groups behind California's Proposition 8 said this week that it will seek to ban same-sex marriage in the state through a referendum. The state Supreme Court legalized gay marriage in April.
Voters in Florida and Arizona also approved similar bans in a setback for the gay rights movement.