SAN FRANCISCO – A divided state Supreme Court on Thursday ruled San Francisco city officials exceeded their authority by marrying gay couples, voiding 4,000 marriage certificates.

“We agree with petitioners that local officials in San Francisco exceeded their authority by taking official action in violation of applicable statutory provisions,” justices wrote in their 114-page opinion.

All seven justices agreed that the city was wrong to issue the licenses, but two judges, Joyce Kennard and Kathryn Werdegar, said the court should not have voided the existing licenses.

“Individuals in loving same-sex relationships have waited years, sometimes several decades, for a chance to wed, yearning to obtain the public validation that only marriage can give,” Kennard wrote in her dissenting opinion.

“In recognition of that, this court should proceed most cautiously in resolving the ultimate question of the validity of the same-sex marriages performed in San Francisco.”

The ruling brings partial clarity to an issue that has baffled legal experts and split the country along ideological lines. But the ultimate legality of same-sex marriages has yet to be decided, and the opinion leaves about 4,000 married couples without valid marriage licenses.

A dozen or so gays gathered in front of the Supreme Court as the opinion was released, most of whom cried upon reading the decision to nullify the marriages. An attorney with Lambda Legal, which defends gay and lesbian rights, said the ruling was “shockingly disrespectful.”

“I don’t accept that,” said Molly McKay of California Marriage Equality, wearing a wedding dress and veil. “We’re married (and) we’re not giving it back.”

“We vowed to be together for better or for worse, and today is the worst,” said John Lewis, wearing a tuxedo and accompanied by his husband, Stuart Gaffney.

Gay-marriage opponents immediately praised the high court, saying the ruling was the first step toward conclusively banning legal recognition of the practice.

“Disobedience and defiance of state law has been properly rebuked today by the state Supreme Court,” said attorney Jordan Lorence, who argued against the city in front of the court in May.

He said the overarching social issue is “a man and a woman marriage is the best way to order society.”

Supreme Court justices considered whether city officials could knowingly violate a law they believe is unconstitutional, not whether a state ban on gay marriage is constitutional.

San Francisco issued thousands of marriage licenses to same-sex couples in February and March before the state’s high court ordered a halt on March 11, shortly after the state and a trio of San Francisco residents filed separate suits asking the Supreme Court to resolve the issue.

The city immediately sued the state, asking a Superior Court judge to rule on the constitutionality of the marriages. The lower-court cases have yet to be argued, and it could be years before gay and lesbian couples have a definitive answer about marriage.

Attorney General Bill Lockyer, a Democrat who found himself in a rare alliance with what he called “conservative groups,” said San Francisco Mayor Gavin Newsom’s decision to issue the licenses was courageous, but misguided.

“Rule of law, rule of law, rule of law,” Lockyer told reporters in his San Francisco office after the ruling. “That is how we rule our state.”

Newsom said Thursday he still feels he was right to authorize the same-sex marriages. Gay couples eventually will win the battle to marry, he said.

“(The couples) took a stand and there is nothing any judge, lawyer or politician will ever do to take that away from them,” Newsom said. “We will prevail. It is simply a matter of time.”

The Supreme Court expressly shied away from the constitutional issue in its ruling Thursday.

“To avoid any misunderstanding,” the justices wrote, “we emphasize that the substantive question of the constitutional validity … is not before our court in this proceeding, and our decision in this case is not intended, and should not be interpreted, to reflect any view on that issue.

“Should the applicable statutes be judicially determined to be unconstitutional in the future, same-sex couples then would be free to obtain valid marriage licenses and enter into valid marriages.”

Some couples and legal experts criticized the court for invalidating the marriage licenses before the constitutional issue had been explored.

The justices were more hurtful than they had to be, said Larry Levine, a law professor at the University of the Pacific’s McGeorge School of Law in Sacramento.

“I think a more humane approach would have been to keep those marriages valid, but on hold,” said Levine, founder of Sacramento Lawyers for Equality of Gays and Lesbians. “I think the court lost an opportunity to be more compassionate.”

Lockyer defended the Supreme Court’s decision, saying it was Newsom’s fault the marriages were deemed legal.

“If the mayor doesn’t have the authority, how can you have a valid marriage?” he asked. “It isn’t logical.”

The court applied the mayor’s lack of authority to other hypothetical decisions, saying local leaders wouldn’t have the right to disregard California’s domestic-partnership laws any more than Newsom had the right to issue licenses. City officials need to file lawsuits to contest a law’s legality, they said.

The court’s point makes sense, said Stanford University law professor Pam Karlan.

“The basic point they make is there is an orderly way of contesting the constitutionality of marriage laws,” she said. “The idea that local officials ought to be free to disregard state law is a pretty controversial statement.”

Randy Thomasson, who challenged Newsom’s actions in San Francisco Superior Court, said Thursday in Sacramento the Supreme Court ruling is the first step toward preserving traditional marriage.

“But marriage is not safe as long as there are liberal judges and Democratic politicians in power,” said Thomasson, executive director of the Campaign for California Families.

Religious-rights attorneys representing the three San Francisco plaintiffs told the Supreme Court that San Francisco has no right to “adopt a radical interpretation” of marriage laws.

If city leaders were allowed to decide which laws to follow, “our uniform system of laws would be reduced to a patchwork of disparate rights and obligations based upon the beliefs of local officials,” attorneys argued in briefs filed with the court.

City leaders answered that San Francisco should not be compelled to enforce unconstitutional laws.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.