Even as voters in California banned same-sex marriage in a tight referendum, Tuesday's election opened the door for the same debate in New York.

The pending shift in state Senate control away from Republicans removes one clear obstacle to legalizing gay marriage in New York, though opponents aren't conceding anything yet and advocates say they have work to do.

Democrats won a narrow majority in New York's Senate, where Republicans have buried legislation to start issuing marriage licenses regardless of gender. A Senate power shift was not a sure thing because four Democrats were considering an alliance with the GOP, which could swing the 32-30 majority back to Republicans.

"The only chance we had for meaningful debate or consideration of these issues in the state Senate was with a new Senate leadership," said Alan Van Capelle, executive director of the Empire State Pride Agenda, New York's largest homosexual-rights advocacy group. He added that no bills have passed in New York without some votes from members of both parties.

The Rev. Duane Motley, founder of New Yorkers for Constitutional Freedoms, which opposes gay marriage, said they knew that with Republicans in control of the Senate that legislation to legalize it "was not going to come up." With Democrats in control, he said party members will be pushing for it, but he questioned whether they have the votes.

"I think there's at least four or five Democrats who wouldn't support it," said Motley, who said his group represents more than 2,000 evangelical churches and 500 other Christian organizations statewide. He believes the Republican senators will remain opposed.

"The Senate has never taken it up because the leadership of the Senate and the rank-and-file of the Republican senators were not in favor of it. You might find one maverick in there, but on that subject there was unity," Motley said. "We're going to wait to see who the new leadership is in the Senate and what the agenda is going to be. There's no need to yell wolf when there's no wolf around."

One of the four Democratic senators who met a day after the election with GOP leaders was Sen. Ruben Diaz Sr. of the Bronx, who opposes legalizing gay marriage.

Though Sen. Malcolm Smith of Queens, leader of the Senate's Democratic Caucus, supports gay marriage, he said his conference's first priority is the state's fiscal crisis, followed by job creation upstate.

The Democrat-controlled state Assembly in 2007 passed legislation to legalize gay marriage 85-61, a measure backed by then-Gov. Eliot Spitzer.

In May, Gov. David Paterson, also a Democrat, issued a directive requiring state agencies to immediately recognize as valid in New York gay marriages performed legally elsewhere, such as Canada, Massachusetts and, for the past several months, California.

Paterson has said that if the Assembly and Senate pass legislation to legalize gay marriage that he will sign it.

It's not clear yet if political support for gay marriage will be affected by Tuesday's vote in California, where 52 percent of those voting favored the ban versus 48 percent against. It was the first time a state took away gay marriage after it had been legalized. Amendments to ban gay marriage also were approved in Arizona and Florida.

Van Capelle said Empire Pride achieved both its election goals Tuesday.

"Every member of the Assembly who voted for marriage equality and transgender civil rights won their re-election," he said, adding that the second goal was to flip the New York state Senate by two seats in an attempt to put in a pro-gay rights majority.

"And I'm happy to say we replaced two longtime homophobic members of the state Senate with two long-standing supporters of our community."

He was referring to Democrat Joseph Addabbo, who beat Republican Sen. Serphin Maltese in Queens, and Democrat Brian Foley, who beat Republican Sen. Caesar Trunzo on Long Island. Both Maltese and Trunzo publicly opposed gay marriage.

A Quinnipiac poll in June showed New Yorkers split over gay marriage, with 42 percent saying same-sex couples should be allowed to legally marry, 31 percent saying they should be allowed to form civil unions but not marry, and 21 percent saying there should be no legal recognition of same-sex unions.

However, 53 percent of voters supported Paterson's order to state agencies to recognize same-sex marriages performed outside New York, while 40 percent disapproved.

"New York is fairly liberal on this. If you didn't have a fiscal crisis and you had a nice even-toned, even landscape for politics, maybe you could do it," said Maurice Carroll, director of the Quinnipiac University Polling Institute. "You never know, but I can't believe that the Senate leadership would want to get embroiled in this when they've got tough mainstream things to do. This is a social issue with a lot of emotion."