* Key part of federal marriage law is struck down
* Justices pave way for same-sex marriage in California
* Divided top court decides two cases in 5-4 rulings
* Obama, a gay marriage supporter, welcomes court's action
The U.S. Supreme Court delivered a landmark victory for gay rights on Wednesday by forcing the federal government to recognize same-sex marriage in states where it is legal and paving the way for it in California, the most populous state.
As expected, however, the court fell short of a broader ruling endorsing a fundamental right for gay people to marry, meaning that there will be no impact in the more than 30 states that do not recognize gay marriage.
The two cases, both decided on 5-4 votes, concerned the constitutionality of a key part of a federal law, the 1996 Defense of Marriage Act (DOMA), that denied benefits to same-sex married couples, and a voter-approved California state law enacted in 2008, called Proposition 8, that banned gay marriage.
The court struck down Section 3 of DOMA, which limited the definition of marriage as between a man and a woman for the purposes of federal benefits, as a violation of the U.S. Constitution's guarantee of equal protection under the law.
Justice Anthony Kennedy, 76, appointed to the court by Republican President Ronald Reagan in 1988, was the key vote and wrote the DOMA opinion, the third major gay rights ruling he has authored since 1996.
In a separate opinion, the court ducked a decision on Proposition 8 by finding that supporters of the California law did not have standing to appeal a federal district court ruling that struck it down. By doing so, the justices let stand the lower-court ruling that had found the ban unconstitutional.
Chief Justice John Roberts wrote the Proposition 8 opinion, ruling along procedural lines in a way that said nothing about how the court would rule on the merits. The court was split upon unusual lines, with liberals and conservatives in the majority and the dissent.
By ruling this way on Proposition 8, the court effectively let states set their own policy on gay marriage, and as a result ballot initiative battles are certain to break out across the country. Further battles are likely also in courts and legislatures, state by state.
President Barack Obama applauded the court's DOMA decision and directed U.S. Attorney General Eric Holder to review all relevant federal laws to ensure the ruling is implemented.
Gay marriage stirs cultural, religious and political passions in the United States as elsewhere.
The Supreme Court rulings come amid rapid progress for advocates of gay marriage in recent months and years in the United States and internationally. Opinion polls show a steady increase in U.S. public support for gay marriage.
Gay marriage advocates celebrated outside the courthouse after learning of the rulings. An enormous cheer went up as word arrived that DOMA had been struck down. "DOMA is dead!" the crowd chanted, as couples hugged and cried.
Paul Katami and Jeffrey Zarrillo, a gay couple from Burbank, California, who were two of the four plaintiffs in the Proposition 8 case, were both outside the courthouse.
"We are gay. We are American. And we will not be treated like second-class citizens," Katami said.
He turned to Zarrillo, voice cracking and said: "I finally get to look at the man I love and say, 'Will you marry me?'"
Before Wednesday, 12 of the 50 states and the District of Columbia recognized gay marriage. Three of those dozen - Delaware, Minnesota and Rhode Island - legalized gay marriage this year. California would become the 13th state to allow it.
About a third of the U.S. population now lives in areas where gay marriage is legal, if California is included.
Obama's administration had declined to defend Section 3 of DOMA in court and urged the court to strike down Proposition 8.
"We are a people who declared that we are all created equal, and the love we commit to one another must be equal as well," Obama, the first sitting president to endorse gay marriage, said in a written statement.
While the ruling on DOMA was clearcut, questions remained about what the Proposition 8 ruling would mean in California. Proposition 8 supporters vowed to seek continued enforcement of the ban until litigation is resolved. But California Governor Jerry Brown said the justices' ruling "applies statewide" and all county officials must comply with it.
"The court's decision does not silence the voices of Americans," said Austin Nimocks, a lawyer with the Alliance Defending Freedom, a conservative Christian group. "Marriage - the union of husband and wife - will remain timeless, universal and special, particularly because children need mothers and fathers."
By striking down Section 3 of DOMA, the court cleared the way for legally married couples to claim more than 1,100 federal benefits, rights and burdens linked to marriage status.
Kennedy wrote for the majority that the federal law, as passed by Congress, violated the U.S. Constitution's guarantee of equal protection.
"The federal statute is invalid, for no legitimate purpose overcomes the purpose and effect to disparage and to injure those whom the state, by its marriage laws, sought to protect in personhood and dignity," Kennedy wrote.
Kennedy, often the court's swing vote in close decisions, said the law imposed "a stigma upon all who enter into same-sex marriages made lawful by the unquestioned authority of the states."
Chief Justice Roberts and Justice Antonin Scalia both wrote dissenting opinions in the DOMA case.
Roberts went out of his way to state that the court was not making any big pronouncements about gay marriage. The court, he said, did not have before it the question of whether states "may continue to utilize the traditional definition of marriage."
In Scalia's lengthy opinion, a summary of which he read from the bench, he accused the majority of ignoring procedural obstacles about whether the court should have heard the case in order to reach its desired result.
"This is jaw-dropping," he said of Kennedy's analysis.
As a result of the DOMA ruling, Edith Windsor of New York, who was married to a woman and sued the government to get the federal estate tax deduction available to heterosexuals when their spouses die, will be able to claim a $363,000 tax refund.
One of Windsor's lawyers in the Supreme Court case, Roberta Kaplan, said the decision "will be marked by future generations as a giant step forward along our nation's continuing path towards equality."
Numerous public figures including former President Bill Clinton, who in 1996 signed the DOMA law, and prominent groups including the American Academy of Pediatrics have come out this year in support of same-sex marriage and gay civil rights.
Individual members of Congress - Democrats and Republicans - also voiced new support for gay marriage this year.
Even with recent developments, there is still significant opposition among Republicans, including House of Representatives Speaker John Boehner, who had ordered the House to intervene in the DOMA case in defense of the law. Boehner said in a statement he was "obviously disappointed in the ruling" and predicted that a "robust national debate over marriage" would continue.
While more developments lie ahead, the legal fight over gay marriage already constitutes one of the most concentrated civil rights sagas in U.S. history.
Just 20 years ago, the Hawaii Supreme Court ruled that its state constitution could allow gay marriage, prompting a nationwide backlash and spurring Congress and a majority of states, including Hawaii, to pass laws defining marriage as between only a man and woman.
In 2003, when the top court of Massachusetts established a right to same-sex marriage under its constitution, the action triggered another backlash as states then adopted constitutional amendments against such unions. Five years later, the tide began to reverse, and states slowly began joining Massachusetts in permitting gays to marry.
The cases are United States v. Windsor, U.S. Supreme Court, No. 12-307 and Hollingsworth v. Perry, U.S. Supreme Court, No. 12-144.