In landmark rulings for gay rights, the US Supreme Court struck down a law denying federal benefits to homosexual couples and cleared the way for same-sex marriage in California.

{keywords}

Cheers rang out on both coasts among supporters of gay marriage after the historic decisions, with 1,000 people celebrating outside the high court in Washington and hundreds more rejoicing in San Francisco.

The sharp divisions on the high court over the issue mirrored those across the United States, and the nine justices stopped short of legalizing same-sex marriage nationwide.

In a 5-4 decision, the court first struck down the Defense of Marriage Act (DOMA), which denied federal benefits to married gay and lesbian couples by strictly defining marriage as a union between a man and a woman.

"DOMA is unconstitutional as a deprivation of the equal liberty of persons that is protected by the Fifth Amendment" of the Constitution, said the majority opinion written by Justice Anthony Kennedy.

President Barack Obama hailed the decision, saying in a statement: "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."

The court also said a case on Proposition 8, a 2008 voter initiative in California that prohibited same-sex marriage in the nation's most populous state, was not properly brought before them.

That 5-4 decision -- which indicated gay marriages would likely soon resume in California -- enabled the justices to dodge the thornier issue of whether same-sex marriage is a constitutional right throughout the United States.

Twelve US states plus the District of Columbia now recognize same-sex marriage, but about 30 states have decreed that marriage can only exist between a man and a woman.

"Now we will be married and be equal to every other family in California," said Kris Perry, a plaintiff in the Proposition 8 case, alongside her partner Sandy Stier on the Supreme Court steps.

"Thank you to the Constitution... but it's not enough," added Stier. "It's got to go nationwide. This can't wait decades" for marriage equality to be legalized in all 50 states.

Obama, who left Washington for a tour of Africa just an hour before the rulings were issued, is the first serving US president ever to come out publicly in favor of marriage equality.

White House spokesman Jay Carney said the president had telephoned 84-year-old Edith Windsor, the plaintiff in the DOMA case, and "congratulated her on this victory, which was a long time in the making."

Obama also called Chad Griffin, head of the Human Rights Campaign, the leading LGBT civil rights group in the United States, and the plaintiffs in the Prop 8 case to congratulate them on a "tremendous victory."

In the wake of the DOMA ruling, Defense Secretary Chuck Hagel said spouses of gays and lesbians in the military would get the same benefits as their heterosexual counterparts "as soon as possible."

And former president Bill Clinton, who signed DOMA into law but later called for its reversal, applauded the ruling, saying "discrimination towards any group holds us all back in our efforts to form a more perfect union."

But there was outrage among social conservatives.

"Today is a tragic day for marriage and our nation," said the US Conference of Catholic Bishops, which urged Americans to pray to God for a review of the Supreme Court's "wrong" decision.

"Today's decision is certainly a setback for the traditional values that make up the backbone of our country," echoed Bob Goodlatte, the Republican chairman of the House of Representatives judiciary committee.

"The DOMA ruling has now made the normalization of polygamy, pedophilia, incest and bestiality inevitable," added Bryan Fischer, director of issue analysis at the American Family Association.

DOMA denied married gay and lesbians a raft of federal benefits that straight couples take for granted, from tax breaks to family hospital visits and the ability to sponsor a spouse for a residence visa.

Celebrations erupted across the United States, after the decisions were announced, including in San Francisco, home to America's largest gay community and in New York's Greenwich Village, where hundreds gathered at the famous Stonewall Inn -- touted as the cradle of the American gay rights movement -- to celebrate the landmark ruling.

There was also an appearance there by the petite, elderly Windsor who thanked for the crowd for its support as she celebrated her victory in the DOMA case.

Windsor was hit with a $363,000 estate tax bill after the 2009 death of her lifelong partner Thea Spyer, whom she had married in Canada. Had the couple been straight, the tax bill would have been much less.

She now can look forward to a refund of that payment, plus a sizeable sum from the government in interest.

Source: AFP