In a big day for gay-rights advocates, the Supreme Court on Wednesday struck down a federal provision denying benefits to legally married gay couples and issued a separate ruling that paves the way for same-sex marriages to resume in California.

Cheers erupted on the steps of the high court, as the rulings were handed down. The latter decision did not speak to the constitutionality of gay marriage bans in California, or in the country as a whole. The court avoided a broad ruling, and rather, determined that the defenders of California's Proposition 8 ban on gay marriage did not have the standing to appeal lower court rulings against the ban.

As a result, California is likely to allow same-sex marriages to resume in a matter of weeks. Gov. Jerry Brown has already set that process in motion.

The more sweeping decision, though, came in relation to the federal Defense of Marriage Act, which the court said was unconstitutional and effectively gutted by ruling against a provision that denied benefits to legally married gay couples.

The 5-4 ruling -- a major victory for gay-rights advocates -- means those same-sex couples would be eligible for federal benefits. President Obama, who applauded the decision, directed his administration to review "all relevant federal statutes" to comply with the ruling.

More On This... Supreme Court paves way for gay marriage in California

Justice Anthony Kennedy wrote the majority opinion.

"DOMA divests married same-sex couples of the duties and responsibilities that are an essential part of married life and that they in most cases would be honored to accept were DOMA not in force," he wrote.

Kennedy wrote that the law "places same-sex couples in an unstable position of being in a second-tier marriage."

The ruling prompted tension among the divided court. Multiple dissenting opinions were filed. Justice Antonin Scalia, reading from his dissent, said the components of the majority's ruling are "wrong."

"The error in both springs from the same diseased root: an exalted notion of the role of this Court in American democratic society," he said.

Social conservatives were similarly disappointed.

"They are rejecting the truth. It's a sad day," said Frank Page, president of the Southern Baptist Convention Executive Committee. "Christians have to live in the world in which we live. We will adapt and adjust to the realities of the law change. At the same time we will continue to preach, declare, and live the truth that our God does not get involved in swing votes and cultural change when there is a biblical principle at stake."

But David Boies, attorney for the plaintiffs in the Prop 8 case, hailed both rulings as a step toward "true equality." He said that while the California case was not ruled on the merits, the DOMA ruling demonstrates that when the issue of gay marriage returns to the high court, "marriage equality will be the law throughout this land."

The provision in question defined marriage as between a man and woman and in doing so prevented married gay couples from receiving a range of tax, health and retirement benefits that are generally available to married people.

Same-sex marriage has been adopted by 12 states and the District of Columbia. Another 18,000 couples were married in California during a brief period when same-sex unions were legal there.

"Under DOMA, same-sex married couples have their lives burdened, by reason of government decree, in visible and public ways," Kennedy said.

"DOMA's principal effect is to identify a subset of state-sanctioned marriages and make them unequal," he said.

He was joined by the court's four liberal justices.

Chief Justice John Roberts and Justices Samuel Alito, Antonin Scalia and Clarence Thomas dissented.

Scalia said the court should not have decided the case.

"While I sharply disagree with the Supreme Court’s decision on these two marriage cases, when it comes to issues involving God’s laws it doesn't ultimately matter what I or anyone else thinks about a court’s ruling," evangelist Franklin Graham said in a statement.

The Associated Press contributed to this report.