The California Supreme Court (search) ruled unanimously Thursday that San Francisco's mayor overstepped his authority by issuing same-sex marriage licenses this spring. The court also voided all the marriages of gay and lesbian couples sanctioned by the city.

Click here to read the court's ruling.

The court said the city violated the law when it issued the certificates and peustice Ronald George noted that Thursday's ruling doesn't address "the substantive legal rights of same sex couples. In actuality, the legal issue before us implicates the interest of all individuals in ensuring that public officials execute their official duties in a manner that respects the limits of the authorities granted to them as officeholders."

The justices also decided with a 5-2 vote to nullify the 3,995 marriages peformed before the court halted the weddings on March 11. Their legality, Justice Joyce Kennard wrote, must wait until "the constitutionality of California laws restricting marriages to opposite-sex couples has been authoritatively resolved through judicial proceedings now pending in the courts of California."

About a dozen gay and lesbian couples, some wearing wedding dresses and tuxedos, waited for the decision on the steps of the Supreme Court building. Some began to cry when Molly McKay of Marriage Equality California (search) read that their marriages would be voided.

"We're going to continue to honor our relationship and honor our marriage in a way that a lot of heterosexuals don't and in a way that a lot of heterosexuals do," vowed McKay. "We're going to make this one of the most romantic civil rights struggles on earth."

The same-sex marriages had virtually no legal value, but powerful symbolic value. Their nullification by the high court dismayed Del Martin and Phyllis Lyon, the first same-sex couple to receive a marriage license in San Francisco.

"Del is 83-years-old and I am 79," Lyon said. "After being together for more than 50 years, it is a terrible blow to have the rights and protections of marriage taken away from us. At our age, we do not have the luxury of time."

The justices agreed to resolve the legality of the weddings sanctioned by Mayor Gavin Newsom (search) after emergency petitions were filed by conservative interest groups and the state's top law enforcement official, Attorney General Bill Lockyer (search).

"The justices have restored the rule of law in California," said Alliance Defense Fund (search) Senior Counsel Jordan Lorence.

Another anti-gay group said the mayor had acted "too fast, too soon."

"Instead of helping his cause, Mayor Newsom has set back the same-sex marriage agenda and laid the foundation for the pro-marriage movement to once and for all win this battle to preserve traditional marriage," said Mathew Staver, who represents Campaign for California Families (search), which filed one of several lawsuits challenging the gay marriages.

San Francisco's gay weddings, which followed a landmark ruling by Massachusetts' top court allowing gay marriage — prompted President Bush to push for changing the federal constitution to ban same-sex marriage, an effort that has become campaign fodder this election year.

The California court sided with Lockyer's arguments, ruling that Newsom's actions would foment legal anarchy and sanction local officials to legislate state law from city halls or county government centers.

When the justices agreed in March to hear the case, they said they would decide only whether Newsom overstepped his mayoral powers for now, but would entertain a constitutional challenge— that gays should be treated the same as heterosexual couples under the California Constitution — if such a lawsuit worked its way to the justices through the lower courts.

Gay and lesbian couples immediately acted on that invitation, suing in San Francisco County Superior Court alleging laws barring them from marrying were discriminatory. Mayor Newsom filed a similar lawsuit.

"Ultimately, we believe when we deal with the issue of the constitutionality of same-sex marriage in California, Mayor Newsom's position will be vindicated at the end of the day," said Dennis Herrera, San Francisco's city attorney.

The now-consolidated cases are unlikely to reach the California Supreme Court for at least a year or more, leaving California's most significant gay rights challenge on the back burner as that litigation percolates in pretrial proceedings. California lawmakers have refused to take a position on the matter, and have left the politically volatile issue to its Supreme Court.

Voters have also sat idle, awaiting a definitive ruling on the merits of whether the state constitution allows gay marriage, and have not used the voter initiative process to force the issue.

Newsom argued to the justices in May that the ability of same-sex couples to marry was a "fundamental right" that compelled him to act. Newsom authorized the marriages by citing the California Constitution's ban against discrimination, and claimed he was duty-bound to follow this higher authority rather than state laws banning gay marriage.

The Arizona-based Christian law firm Alliance Defense Fund (search), a plaintiff in one of two cases the justices decided Thursday, had told the justices that Newsom's "act of disobedience" could lead other local officials to sanction "polygamists."

Newsom's defiance of state law created huge lines at City Hall by gays and lesbians waiting to be married, and ignited a firestorm engulfing statehouses and ballot boxes nationwide.

Missouri voters this month endorsed a state constitutional amendment banning same-sex marriage — a move designed to prevent that state's judiciary from agreeing with the arguments Newsom is making in California.

A state constitutional challenge by gays in Massachusetts prompted that state's highest court to endorse the gay marriages that began there in May. A judge in Washington state this month also ruled in favor of gay marriage, pending a resolution from that state's top court.

Louisiana residents are to vote on the same issue Sept. 18. Then Arkansas, Georgia, Kentucky, Mississippi, Montana, Oklahoma, Oregon and Utah are to vote Nov. 2. Initiatives are pending in Michigan, North Dakota and Ohio.

Four states — Alaska, Hawaii, Nebraska and Nevada — already have similar amendments in their constitutions.

The cases decided Thursday are Lockyer v. San Francisco, S122923; Lewis v. Alfaro, S122865.