WASHINGTON (AFP) - In landmark rulings for gay rights, the US Supreme Court on Wednesday struck down a law denying federal benefits to homosexual couples and cleared the way for same-sex marriage in California.
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 recognise 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 legalised in all 50 states.
Mr 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 83-year-old Edith Windsor, the plaintiff in the DOMA case, and "congratulated her on this victory, which was a long time in the making."
Mr 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, Defence 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 Mr Bob Goodlatte, the Republican chairman of the House of Representatives judiciary committee.
"The DOMA ruling has now made the normalization of polygamy, paedophilia, incest and bestiality inevitable," added Bryan Fischer, director of issue analysis at the American Family Association.
Fifty-three per cent of Americans think same-sex marriage should be legally recognised, according to a Gallup survey in May that echoed a string of similar findings by other polling organisations.
The fight against DOMA was spearheaded by Windsor, a New Yorker hit with a $363,000 estate tax bill after the 2009 death of her lifelong partner Thea Spyer, who she had married in Canada.
Had the couple been straight, the tax bill would have been much less.
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.
Indeed, among the first to benefit Wednesday was a gay Colombian, married to an American man, whose deportation was forestalled when an intern from the non-profit DOMA Project literally ran several New York blocks to the immigration court with a hot-off-the-press copy of the Supreme Court decision.
In California, Governor Jerry Brown indicated that same-sex marriages could resume in a matter of weeks.
"After years of struggle, the US Supreme Court today has made same-sex marriage a reality in California," he said in a statement.
Mr Obama said: "The laws of our land are catching up to the fundamental truth that millions of Americans hold in our hearts: when all Americans are treated as equal, no matter who they are or whom they love, we are all more free."