Same-sex marriage advocates rally at San Francisco court in June 2011. Getty Images/Justin Sullivan The Supreme Court's decision not to revive California's gay marriage ban is being hailed as a victory for gay couples in the state. It's hard to believe that just three years ago prominent gay rights groups condemned the lawsuit seeking to overturn that ban.

To be sure, the court's decision didn't give the challengers to Proposition 8 everything they wanted. Legal odd couple Ted Olson and David Boies (who opposed each other in Bush v. Gore) hoped the Supreme Court would say there's a constitutional right to same-sex marriage.

While the court didn't go that far, its decision that gay marriage opponents lack standing to fight their case in court means gays in America's most populous state can get married. The decision is not the disaster the ACLU and other prominent gay rights groups feared.

In May 2009, the ACLU, the Human Rights Campaign, Lambda Legal, and other gay rights groups issued a strongly worded statement opposing a court challenge to Prop 8. Voters had approved the gay marriage ban just six months before, when President Obama was elected.

While Olson and Boies were fighting the ban in a federal district court, it was clear even then that they wanted the U.S. Supreme Court to weigh in on the case. The gay rights groups thought that was a very bad idea.

"History says the odds at the Supreme Court are not so good," the statement said. "A loss would likely set back the fight for marriage nationwide, and hurt LGBT parents, employees, and students all over America."

The ballot box is the best place to fight for gay marriage, the groups said.

"Rather than filing premature lawsuits, we need to talk to our friends, family, and neighbors, and help them understand why denial of freedom to marry is wrong," the statement read.

Given the dramatic shift in public opinion on gay marriage, the gay rights groups had a point. It's highly possible California voters would have overturned Prop 8 if they voted on it again. Maine voters did just that in November, three years after Mainers approved a gay marriage ban. (Ken Mehlman, a gay former Bush strategist, reportedly helped gay marriage proponents revamp their campaign.)

While California voters might done the same thing, the ambitious lawsuit brought by Boies and Olson has definitely helped shape the gay marriage debate. It's no accident that Boies and Olson were a team of rivals.

Olson, a former Solicitor General under George W. Bush, is a longtime supporter of gay marriage. He asked Boies — a noted liberal — to join him in overturning Proposition 8 because he wanted a bipartisan team.

“We wanted to win in court but we also wanted to win in the court of public opinion,” Olson told the Kentucky Bar Association. “People saw us on TV and thought, ‘If they can come together, why can’t we.'"