WASHINGTON — The Supreme Court will take up the issue of gay marriage for the first time, agreeing to rule on a California ballot measure banning the practice and a federal law defining marriage as solely an opposite-sex union.

The cases, which the court will decide by June, loom as a potential turning point on one of the country’s most divisive issues. High court review comes as the gay marriage movement is showing unprecedented momentum, winning victories at the polls in four states this year.

The California dispute will address whether gay marriage is legal in the most populous U.S. state, home to more than 37 million people. The case also gives the justices a chance to go much further and tackle the biggest issue: whether the Constitution guarantees same-sex marriage rights nationwide.

That question is “perhaps the most important remaining civil rights issue of our time,” said Theodore Olson, a Washington lawyer leading the legal fight against the California measure.

In addition to the California case, the justices Friday said they will review the U.S. Defense of Marriage Act, a 1996 law that two federal appeals courts said impermissibly treats legally married gay couples differently than heterosexual couples. DOMA, as the measure is known, blocks gays from claiming the same federal tax breaks and other marriage benefits that opposite-sex spouses enjoy.

The case “is of exceptional practical importance to the United States and to tens of thousands of individuals affected,” the Obama administration said in court papers opposing the law while urging the court to review it.

Support for gay nuptials has soared since 1996, when DOMA was approved 342-67 in the House and 85-14 in the Senate before being signed into law by President Bill Clinton.

Voters on Nov. 6 approved gay marriage in Washington, Maryland and Maine and rejected a bid in Minnesota to amend the state constitution to bar the practice.

By Jan. 1, same-sex couples will have the right to marry in nine states and the District of Columbia, and President Barack Obama has said he backs that right.

Previous Supreme Court cases provide few hints as to how the court will rule. Although Justice Anthony Kennedy, who may cast the deciding vote, backed gay rights in 1996 and 2003 rulings, neither case involved marriage.

California voters approved Proposition 8, banning gay marriages, in 2008. The ballot initiative reversed a decision by the California Supreme Court, which five months earlier had said the state constitution guaranteed the right to gay marriage.

In challenging the law, Olson joined forces with David Boies, his opponent from Bush v. Gore, the Supreme Court case that resolved the 2000 presidential election deadlock. The pair set out to win a Supreme Court ruling establishing same-sex marriage as a constitutional right.

At the appeals court level, they instead won a narrower ruling with limited applicability beyond California’s borders. The San Francisco-based 9th U.S. Circuit Court of Appeals said Proposition 8 violated the constitutional guarantee of equal protection by stripping same-sex couples of a right they once had — and that heterosexual couples would continue to possess.

Writing for the majority on the 2-1 court, Judge Stephen Reinhardt said the measure “serves no purpose, and has no effect, other than to lessen the status and human dignity of gays and lesbians in California, and to reclassify their relationships and families as inferior to those of opposite-sex couples.”

Supporters of Proposition 8, led by former state Sen. Dennis Hollingsworth, appealed to the Supreme Court. They argued that the lower court’s reasoning was a “suggestion that any experiment with the definition of marriage is irrevocable.”

The group also contended in court papers that Proposition 8 “furthers society’s interest in responsible procreation and child-rearing.”

Olson said in an interview before the court acted that he would make California-specific arguments as well as broader contentions that could establish same-sex marriage rights nationwide. Marriage, Olson said, is a “fundamental right that cannot be taken away from citizens on the basis of their sex or sexual orientation.”

In court papers, Olson and Boies defended Reinhardt’s reasoning. They said the judge correctly concluded that, by stripping away marriage rights, Proposition 8 “achieves nothing except the marginalization of gay and lesbian individuals and their relationships.”

Gay marriage is on hold in California while the litigation plays out. More than 18,000 same-sex couples were married in the state before the ballot initiative passed.

Both sides asked the court to take up DOMA, a law the Obama administration decided last year it would begin opposing in court. That reversal left it to congressional Republicans led by House Speaker John Boehner to spearhead the defense.

Opponents say the law violates the Constitution’s equal protection guarantee by denying legally married gay couples the same federal benefits as opposite-sex spouses. Under the law, people in same-sex marriages can’t file joint federal tax returns, claim exemption from estate taxes, receive Social Security survivor benefits or obtain health insurance as the spouse of a federal employee.

Supporters of the law say it promotes traditional marriage, and by extension makes it more likely that children will grow up in a nurturing environment.

“Traditional marriage protects civil society by encouraging couples to remain together to rear the children they conceive,” 15 states led by Indiana argued in court papers. “It creates the norm that potentially procreative sexual activity should occur in a long-term, cohabitative relationship.”

The Boston-based 1st U.S. Circuit Court of Appeals and the New York-based 2nd Circuit rejected that reasoning. Ruling in the Massachusetts case, the 1st Circuit pointed to “a lack of any demonstrated connection between DOMA’s treatment of same-sex couples and its asserted goal of strengthening the bonds and benefits to society of heterosexual marriage.”

The 2nd Circuit broke new legal ground by saying that laws discriminating against gays, like those targeting racial minorities and women, should get especially rigorous scrutiny from the courts. The Obama administration backs that approach.

The court will review the law using the case of 83-year-old New York resident Edie Windsor, who is fighting a $363,000 estate tax bill imposed after the 2009 death of her spouse, Thea Clara Spyer. Windsor and Spyer were married in Canada in 2007, a marriage the 2nd Circuit concluded would be recognized under New York law.

The legal battle over DOMA doesn’t affect a separate provision in the law that says states can refuse to recognize same-sex marriages from other jurisdictions.

Kennedy looms as the potential swing vote in both cases. He has been a champion of gay rights in past cases, writing the 2003 decision that said states can’t criminalize gay sex acts. Overturning the convictions of two men in Texas, he wrote that “the state cannot demean their existence or control their destiny by making their private sexual conduct a crime.”

Kennedy, appointed by President Ronald Reagan in 1988, also wrote the court’s 1996 decision striking down a Colorado constitutional amendment that barred cities and counties from enacting anti-discrimination laws to protect gays.

Even so, he underscored in 2003 that he wasn’t passing judgment on gay marriage. He said the case “does not involve whether the government must give formal recognition to any relationship that homosexual persons seek to enter.”