Both sides of California's gay marriage debate say yesterday's ruling by a federal district court judge was only the opening salvo in a legal battle headed for the U.S. Supreme Court. And they've begun honing their arguments to ultimately sway the justices who will have the final say.

U.S. District Court Judge Vaughn Walker's opinion stated that the state's same-sex marriage ban amounts to unconstitutional discrimination and should be immediately struck down. He later issued a stay on the order overturning Proposition 8 to allow supporters of the measure to argue why the ban should remain in effect while they pursue an appeal.

"We have other battles aheads of us," said former Bush administration Solicitor General Theodore Olson, who joined former counsel for Al Gore in the 2000 election, David Boies, in opposing Proposition 8.

"Ted and I have a deal -- He is going to get the five justices that were for him in Bush v. Gore and I'm going to get the 4 justices that were with me in Bush v. Gore," Boies joked Wednesday.

Supporters of the California same-sex marriage ban acknowledged Judge Walker's decision was not unexpected and conceded propsects that it will be reversed by the Ninth Circuit Court of Appeals also looked uncertain. But they are holding out hope for the Supreme Court.

"Let's not lose sight of the fact that this case is headed for the U.S. Supreme Court, where the right of states to define marriage as being between one man and one woman will be affirmed," said Maggie Gallagher, chair of the National Organization for Marriage.

When the case reaches the high court, Justice Anthony Kennedy could become the swing vote on a bench narrowly divided by liberals and conservatives, court observers say.

"It has been Justice Anthony Kennedy at the center of a very sharply polarized four-four court who has consistently been over the years a very strong voice on gay rights," Slate's Dahlia Lithwick pointed out on "Good Morning America" today.

"He's been careful to say, 'This doesn't mean I'm for gay marriage, by the way.' But time after time, he's not just been the fifth vote for anti-discrimination principles, but he's also been a strong vote for things like dignity and humanity and the right to choose your own lifestyle," she said.

Still, how Kennedy or the other eight justices will vote is only speculation. The court does generally have a record of not making rulings that are contrary to majority public opinion.

A California Field poll of registered voters last month found 51 percent support legalizing gay marriage with 42 percent opposed.

But nationwide public views are more narrowly divided, according to the most recent ABC News/Washington Post poll. Forty-seven percent of Americans polled favor gay marriage while 50 percent are opposed.

Judge Walker Calls Marriage Ban an "Artifact"

In his decision Walker sharply criticized the voter-approved Proposition 8 as rooted in "unfounded stereotypes and prejudices."

"Proposition 8 fails to advance any rational basis in singling out gay men and lesbians for denial of a marriage license," wrote Walker in his 136-page decision. "Indeed, the evidence shows Proposition 8 does nothing more than enshrine in the California Constitution the notion that opposite-sex couples are superior to same-sex couples."

The controversial ballot measure was launched in response to a state supreme court decision allowing gays and lesbians to wed. The proposition passed with 52 percent of the vote in November 2008.

"With a stroke of his pen, Judge Walker has overruled the votes and values of 7 million Californians who voted for marriage as one man and one woman," said Brian Brown, president of the National Organization for Marriage, in a statement Wednesday.

Lawyers supporting the ballot measure had argued that voters endorsed a "fundamental, definitional feature" of marriage that has historical roots "in this country and, almost without exception, in every civilized society that has ever existed."

But Walker found the plaintiffs in the case -- one lesbian and one gay couple -- demonstrated by "overwhelming evidence" that Proposition 8 violates their rights to due process and equal protection under the Constitution.

"Moral disapproval alone is an improper basis on which to deny rights to gay men and lesbians. The evidence shows conclusively that Proposition 8 enacts, without reason, a private moral view that same-sex couples are inferior to opposite-sex couples," wrote Judge Walker.

Geoff Kors, executive director for Equality California, which filed an amicus brief supporting the Prop. 8 federal challenge, say gay couples across the state were "thrilled" by the ruling. "Judge Walker has preserved our democracy by ruling that a majority cannot deny a minority group of fundamental freedoms," he said.

The verdict will now be appealed to the Ninth Circuit Court of Appeals and may ultimately reach the U.S. Supreme Court, where experts say a decision could transform social and legal precedent. They compare the potential impact to the famous 1954 Brown v. Board of Education decision, which desegregated schools, and the 1967 Loving v. Virginia decision, which ended laws banning interracial marriage.

Five states -- Massachusetts, Iowa, Connecticut, Vermont and New Hampshire -- and the District of Columbia currently perform same-sex marriages. Four states recognize marriages performed elsewhere, and nine states grant civil unions or partnerships.