California’s law, he wrote, demanded discrimination on the basis of sex and sexual orientation. “Proposition 8 places the force of law behind stigmas against gays and lesbians,” he wrote, including the notion that “gays and lesbians are not as good as heterosexuals” and “gay and lesbian relationships do not deserve the full recognition of society.”

In his ruling, Judge Walker took a conservative approach to his findings of law, said Erwin Chemerinsky, dean of the law school at the University of California, Irvine. Judge Walker laid the factual groundwork that might have allowed him to invoke the tough “strict scrutiny” test to Proposition 8 — a test that most laws flunk.

“His decision does not depend on the higher court finding strict scrutiny,” a legal finding that a higher court might well overturn, Professor Chemerinsky said. Instead, Judge Walker subjected the law to a lower standard that many laws can pass, but that this one, in his opinion, does not.

“He finds it doesn’t even meet rational basis review” for the legal distinction between same-sex marriage and heterosexual unions, Professor Chemerinsky said.

Even some of those who applauded the opinion, however, said the path ahead for it was not clear or easy. Doug NeJaime, an associate professor at Loyola Law School, Los Angeles, said that while he considered Judge Walker’s ruling “a great opinion,” he was skeptical that the strategy behind it would survive through the federal courts. Despite Judge Walker’s efforts to set a factual foundation and the traditions of deference, Mr. NeJaime said, the Supreme Court is not completely constrained by lower court findings of fact.

“We’ve seen time and time again that the Supreme Court can do whatever it wants” with the factual record, and “I don’t see five justices on the Supreme Court taking Judge Walker’s findings of fact to the place that he takes them.”

Professor NeJaime suggested the case might turn on the court’s traditional swing vote, Anthony M. Kennedy, who has shaped decisions that struck down laws that discriminated against gay men and lesbians. The rational basis test used by Judge Walker is in line with the standard used by Justice Kennedy in cases like Lawrence v. Texas, which struck down a state sodomy law. By structuring an opinion that allows the Court to use the lower level of scrutiny, Judge Walker “is speaking to Justice Kennedy,” he said.