A judge has opened the way for the nation's most populous state to follow Massachusetts in allowing same-sex couples to tie the knot, but both sides in the debate predicted a vigorous court fight before California goes the way of its East Coast counterpart.

San Francisco County Superior Court Judge Richard Kramer (search) ruled Monday that while withholding marriage licenses from gays and lesbians has been the status quo, it constitutes discrimination the state can no longer justify.

"The state's protracted denial of equal protection cannot be justified simply because such constitutional violation has become traditional," Kramer wrote. "Simply put, same-sex marriage (search) cannot be prohibited solely because California has always done so before."

Ushering out a social norm long considered sacred won't happen right away, however. Kramer's decision is stayed automatically for 60 days to allow time for appeals, and conservative groups that oppose same-sex marriages vowed to uphold California's one woman-one man marriage laws (search).

"For a single judge to rule there is no conceivable purpose for preserving marriage as one man and one woman is mind-boggling," said Liberty Counsel President Mathew Staver, whose group represents the Campaign for California Families, one of two organizations that joined the state's attorney general's office in defending California's existing laws.

"This decision will be gasoline on the fire of the pro-marriage movement in California as well as the rest of the country," Staver said.

Supporters of same-sex marriage said they are prepared for a lengthy appeal process, but described Kramer's ruling as an unqualified victory. They compared it to the 1948 state Supreme Court decision that made California the first state to legalize interracial marriage.

"Today's ruling is an important step toward a more fair and just California that rejects discrimination and affirms family values for all California families," San Francisco City Attorney Dennis Herrera said.

Jeanne Rizzo, 58, and Pali Cooper, 49, one of the first couples to be denied the chance to marry after the Supreme Court ruling last year, said they were "basking" in Monday's decision.

"We know we have many steps ahead of us, but we have the opportunity to go from here standing in dignity not defense... It is always better to do that," Rizzo said.

The couples, represented by the National Center for Lesbian Rights, Lambda Legal and the American Civil Liberties Union, had argued that denying marriage to same-sex couples violated their civil rights.

Monday's ruling is the latest development in a national debate on the legality and morality of same-sex marriage that has been raging since 2003, when the highest court in Massachusetts decided that denying gay couples the right to wed was unconstitutional in that state.

The two groups opposed to gay marriage rights — The Campaign for California Families and the Proposition 22 Legal Defense and Education Fund — argued that California has a legitimate interest in restricting marriage to opposite-sex couples as a way of encouraging procreation.

Kramer disagreed.

"One does not have to be married in order to procreate, nor does one have to procreate in order to be married," he wrote. "Thus, no legitimate state interest to justify the preclusion of same-sex marriage can be found."

Kramer is the fourth trial court judge since August to decide that the right to marry and its attendant benefits must be extended to same-sex couples. Just as many judges have gone the other way recently, however, refusing to accept the argument that keeping gays and lesbians from marrying violates their civil rights. All the cases are on appeal.

Kramer's decision came in a pair of lawsuits seeking to overturn California's statutory ban on gay marriage. They were brought by the city of San Francisco and a dozen same-sex couples last March, after the California Supreme Court halted the four-week marriage spree Mayor Gavin Newsom initiated when he directed city officials to issue marriage licenses to gays and lesbians in defiance of state law.

The California lawsuits have been closely watched because of San Francisco's historical role as a gay rights battleground. The state has the highest percentage of same-sex partners in the nation, and its Legislature has gone further than any other in voluntarily providing gay couples the perks of marriage without a court order.

Assemblyman Ray Haynes, a Republican, predicted the judge's ruling would spur efforts to amend the state Constitution to ban gay nuptials, as was done in 13 other states last year.

Haynes has introduced a bill to place such a constitutional amendment on the November ballot, but if the Democrat-controlled Legislature defeats it, he said gay marriage opponents would accomplish the task themselves by petition.

"This ruling demonstrates absolutely what we have to do, which is to amend the Constitution so that we can take the question out of the hands of any judge anywhere at any time," he said.