By 52% to 48%, voters approved the measure reinstating a ban on same-sex marriage after the state Supreme Court, in a landmark ruling last May, approved such marriages. Left in limbo were about 18,000 couples who got married in California between May and November of last year. (Note: An earlier version of this post said voters approved by a 52-48 margin the measure reinstating a ban on same-sex marriage after the state Supreme Court, in a landmark ruling last May, approved such marriages.)

The California Supreme Court today upheld Proposition 8’s ban on same-sex marriage but also ruled that gay couples who wed before the election will continue to be married under state law.

The California Supreme Court today upheld Proposition 8’s ban on same-sex marriage but also ruled that gay couples who wed before the election will continue to be married under state law. The decision virtually ensures another fight at the ballot box over marriage rights for gays. Gay rights activists said they may ask voters to repeal the marriage ban as early as next year, and opponents have pledged to fight any such effort. Proposition 8 passed with 52% of the vote.

The case for overturning the initiative was widely viewed as a long shot. Gay rights lawyers had no solid legal precedent on their side, and some of the court’s earlier holdings on constitutional revisions mildly undercut their arguments.

But gay marriage advocates captured a wide array of support in the case, with civil rights groups, legal scholars and even some churches urging the court to overturn the measure. Supporters of the measure included many churches and religious organizations.

The legal fight over same-sex marriage in California began in San Francisco in 2004, when Mayor Gavin Newsom spurned state law, and the city began issuing marriage licenses to gay couples. Long lines of couples showed up to marry and celebrated within view of the court with rice and champagne.

Those marriages sparked a national debate about gay rights and made the marriage question a political issue in an election year. Dozens of states later adopted constitutional amendments to bar same-sex marriage.

Those gay couples who wed in San Francisco later had their marriages rescinded by the California Supreme Court, which ruled that a city could not single-handedly flout state law. But the court said supporters of marriage rights could challenge the ban in the lower courts.

The legal fight moved to San Francisco Superior Court, where a judge struck down the marriage ban as unconstitutional. A Court of Appeal in San Francisco later overturned that decision on a 2-1 vote. The state high court eventually took up the case, which culminated in a May 15 ruling last year declaring gays could marry each other.

Before last fall, California was one of only two states — the other was Massachusetts — to permit same-sex marriage.

Iowa, Connecticut, Vermont and Maine have since legalized it, and lawmakers in New York, New Jersey and New Hampshire are considering bills of their own.

California’s historic 2008 ruling, written by Chief Justice Ronald George, repeatedly invoked the words "respect and dignity" and framed the marriage question as one that deeply affected not just couples but also their children. California has more than 100,000 households headed by gay couples, about a quarter with children, according to 2000 census data.

As soon as the ruling was final, thousands of gay couples showed up at city halls around the state to marry, and many flew in from elsewhere for California weddings. While the wedding business was brisk, opponents mounted a heated campaign with the help of churches and conservatives to overturn the court’s action.

Even though the court has upheld Proposition 8, a key portion of the court’s May 15, 2008, decision remains intact. Sexual orientation will continue to receive the strongest constitutional protection possible when California courts consider cases of alleged discrimination. The California Supreme Court is the only state high court in the nation to have elevated sexual orientation to the status of race and gender in weighing discrimination claims.

--Maura Dolan in San Francisco