TRENTON -- The state Senate rejected a same-sex marriage bill today, a major victory for opponents who contend the measure would infringe on religious freedom and is not needed because the state already permits civil unions.

The 20-14 vote defeating the measure followed an hour and a half of public debate inside the packed Senate chamber. The nearly thousand supporters and opponents of the bill held rallies on the Statehouse steps.

The measure fell seven votes short of the 21 needed for passage.

HOW THEY VOTED

Garden State Equality chairman Steven Goldstein said he had conflicting feelings after the bill's defeat.

"Though we didn’t achieve our final victory today, we’re better positioned than we were a few months ago to win marriage equality," he said. "On the one hand, we resent, more than you can imagine, remaining second-class citizens a bit longer. On the other hand, the ball has moved forward."

Goldstein said they would take the issue to the courts next.

"We are not waiting out the term of any new Administration to bring equality to same-sex couples in our state," Goldstein said.

Statewide polls have shown New Jersey residents closely divided on same-sex marriage, and leading up to today’s vote, indicators showed a majority of the senators opposing the measure.

Moments after the vote, hundreds of gay-rights supporters filled the sidewalk on West State Street in front of the Statehouse. Christi Surmont, 33, of Hamilton, was near tears.

"We were holding out hope that we'd be able to get married and have full citizenship," she said of her and her partner. "But now we'll have to settle for second-class citizenship. For now. We're not done fighting."

She said they would seek a civil union if the current effort failed in the courts.

Momentum for the bill grew after Gov. Jon Corzine lost the November election. He has promised to sign the measure before Gov.-elect Chris Christie takes office. Christie has said he opposes the bill.

After the vote, Corzine said he was appreciative the bill was publicly debated, but was "deeply disappointed by the final tally on this common-sense measure that would have assured equal rights for all New Jerseyans."

"Most assuredly, this is an issue of civil rights and civil liberties, the foundation of our state and federal constitutions," the governor said. "Denying any group of people a fundamental human right because of who they are, or whom they love, is wrong, plain and simple."

Republican State Committee Chairman Jay Webber said he was "heartened" with the outcome.

“From the beginning, Republicans have opposed legislative and judicial efforts to redefine marriage in New Jersey and called for any changes to be put on the ballot for voters to decide. We believe that the majority of New Jerseyans agree with that position," he said.

Last month, the legislation cleared the Senate Judiciary Committee after hours of emotional debate and testimony, which set the stage for today’s full Senate showdown.

New Jersey passed a domestic partnership law in 2002 and legalized civil unions in 2006, but supporters say there are major flaws, like problems with pension benefits and hospitals denying visits to partners. They say gay couples do not have equal rights without being allowed to marry.

Just four state have legalized gay marriage, Massachusetts, Connecticut, Iowa and Vermont, while 30 states have banned it through constitutional amendments.

There were three abstentions in the vote. They were Sens. Paul Sarlo (D-Bergen), Steve Sweeney (D-Gloucester) and James Beach (D-Camden). Sen. Andrew Ciesla (R-Ocean) was not present and Sen. Diane Allen (R-Burlington) has been out sick while she fights cancer.

Full coverage of the Senate debate

Full Star-Ledger coverage of the Gay Marriage Debate in New Jersey

Star-Ledger Graphic: Where the legislators stand, based on statements by senators or their staff