By a vote of 5-2, the justices also ruled that the 3995 marriages celebrated in February and March this year - a calculated act of political disobedience that became known as San Francisco's Winter of Love and generated international attention - should be considered void.
"It would not be prudent or wise," the majority wrote, "to leave the validity of these marriages in limbo for what might be a substantial period of time given the potential confusion (for third parties, such as employers, insurers, or other governmental entities, as well as for the affected couples)..."
The court did not say that Mayor Newsom was wrong to assert that denying gay couples the right to marry was a violation of the equal protection clauses of both the California and the US Constitution. They said, however, that the determination was for the courts to make - in future hearings that have already begun to make their way through the legal system.
The censure of Mayor Newsom had been widely expected, since it was the same court which issued last March's injunction bringing a halt to the procession of gay couples coming to San Francisco's City Hall to be married.
The cancellation of the marriage certificates was, however, a grave disappointment to the couples themselves and to the many advocates who had hailed Mayor Newsom as a courageous trailblazer for gay rights across the United States.
They were planning a big demonstration last night in the city's gay mecca, the Castro district, and another outside City Hall.
The gay marriage issue has featured frequently in the presidential election debate, tripping up both major candidates.
President Bush has sought to make political capital out of his adamant opposition to gay marriage, but failed at the first hurdle in his efforts to sponsor a constitutional amendment forever outlawing it.
His Democratic Party challenger John Kerry, meanwhile, has been pushed into an awkward compromise position - stating his own opposition to gay marriage while endorsing civil unions for same-sex couples.
The issue has sparked fraught debate across the country, with Massachusetts' highest court sanctioning gay marriage in a landmark ruling in May and several states - most recently Missouri - passing laws banning it.
In San Francisco, the gay community is confident it will prevail in the end. One lesbian couple, Cissie Bonini and Lora Pertle, hung their matching wedding gowns on the wall in their bedroom, realising they might one day have to get them down again.
"We'll be married as many times as we need to for it to be legal," Ms Bonini told the San Francisco Chronicle.
-
INDEPENDENT
Bill Lockyer v City and County of San Francisco
San Francisco Mayor:
Letter on gay marriages to County Clerk
Herald Feature: US Election
Related information and links