When gay rights advocates slipped into the San Francisco federal courthouse in early 2009 and challenged California's then-new same-sex marriage ban, their goal was to force the U.S. Supreme Court to address the most pressing civil rights issue of this era.

On Friday, the risky legal strategy paid off. After years of legal sparring in state and federal courts around the country, the nation's highest court decided to review the legal challenge to California's Proposition 8, as well as another crucial case that involves the federal government's sweeping ban on benefits for same-sex couples.

The two cases give the Supreme Court a historic opportunity to rule on whether same-sex couples have a legal right to marry, whether states have the leeway to outlaw same-sex nuptials and whether Congress trampled on the Constitution in 1996 when it decided to deny federal benefits to gay and lesbian couples.

But the Supreme Court, with its slight conservative majority, also could duck the central legal questions surrounding gay marriage and allow the controversy to percolate in the political arena, where more states are starting to grant marriage rights to same-sex couples. In the two cases taken up Friday, the Supreme Court asked for guidance on technical issues that give justices the chance to avoid ruling definitively on the legality of both the California and federal laws.

"The whole spectrum of possibilities remains open," said Vikram Amar, a UC Davis law professor.

The Supreme Court needed four votes to take the two cases, but how the justices may rule will be a guessing game from now until June. Justice Anthony Kennedy is widely considered the key swing vote on the gay marriage question, as he's seen as the center of a court divided between conservative Justices John Roberts, Samuel Alito, Clarence Thomas and Antonin Scalia and liberal Justices Stephen Breyer, Sonia Sotomayor, Elena Kagan and Ruth Bader Ginsburg.

Yet legal experts say there is little precedent to evaluate the court's approach to same-sex marriage rights. Sotomayor and Kagan have yet to speak on a major gay rights case. And the high court proved its unpredictability earlier this year, when Chief Justice John Roberts, ordinarily a reliable conservative, was the deciding vote in upholding the President Obama's health care reforms.

In the Proposition 8 case, the Supreme Court agreed to review a federal appeals court's ruling earlier this year striking down California's voter-approved ban on same-sex marriage. For now, that means same-sex marriage remains on hold in California. The court is expected to hear arguments in the case in mid- to late March, and would rule by the end of its term in June.

The high court also agreed to review a federal appeals court ruling finding the federal Defense of Marriage Act unconstitutional. That case involved a New York woman who was forced to pay estate taxes after her spouse died because the federal government refused to recognize their marriage under DOMA.

The Obama administration has told the Supreme Court it considers the federal law unconstitutional, but House Republicans have intervened to defend the statute.

The Supreme Court was widely expected to take up one of the cases challenging the federal law, in part because numerous federal courts have found it unconstitutional, including in one case out of San Francisco. Proposition 8 supporters were pleased the Supreme Court agreed to hear their arguments.

"Every one of the numerous legal steps we have taken for the past four years has been in anticipation of this moment," said Andrew Pugno, general counsel for protectmarriage.com.

Kristin Perry and Sandy Stier, a Berkeley couple challenging the law, expressed hope the Supreme Court would give them the right to marry, insisting they were not disappointed they didn't get a quicker victory. Had the Supreme Court declined the case, same-sex couples would have gained the right to marry in California.

"What we've always wanted was the very biggest, broadest outcome possible," Perry said. "That can only happen if the Supreme Court listens to the case."

Earlier this year, the 9th U.S. Circuit Court of Appeals found the law unconstitutional, but did so on the narrow grounds it stripped away same-sex couples' previous right to marry in California. The ruling was crafted in a way that might apply only to California's circumstances, but the Supreme Court now has the ability to take a broader approach to same-sex marriage rights and state laws banning the unions.

But the justices also indicated they will review a second issue in the Proposition 8 case: Did backers of the marriage ban have a legal right to defend the law on appeal when California's governor and attorney general have refused to do so?

If the Supreme Court finds Proposition 8 backers do not have so-called "standing," the justices would not have to address the central legal issues. That would basically uphold the original ruling striking down Proposition 8, likely enabling same-sex couples to legally marry in California.

Chief U.S. District Judge Vaughn Walker first struck down Proposition 8 in August 2010. Since that time, both Gov. Jerry Brown and Attorney General Kamala Harris have refused to defend the law because they consider it unconstitutional.

Proposition 8 lawyers say the governor and attorney general should not be able to trump the voters by refusing to defend a law in court. Both the California Supreme Court and 9th Circuit agreed, finding that Proposition 8 backers should be allowed to appeal. But the Supreme Court is now revisiting that question.

"It's a distinct possibility the court will duck Proposition 8 by ruling on the standing issue," said Marc Spindelman, an Ohio State University law professor. "But just because it's an option, doesn't mean it's the most likely one. Too many factors are in play. Part of what's striking about (taking the two cases) is that it leaves so much up in the air."

Howard Mintz covers legal affairs. Contact him at 408-286-0236 or follow him at Twitter.com/hmintz.