A US federal judge has overturned California's voter-approved ban on same-sex marriage.
The judge found it unconstitutionally discriminated against same-sex couples who sought to wed.
The state measure, known as Proposition 8, was passed by voters in 2008. It banned same-sex marriage, although the state offered same-sex civil unions.
Backers of the ban intend to appeal against the judge's ruling. The case is likely to reach the US Supreme Court.
The measure was passed in a ballot referendum by a vote of 52% to 48%.
Currently, five states and Washington DC allow same-sex nuptials, though many states have enacted bans.
The ruling does not immediately allow California same-sex couples to marry, as US District Judge Vaughn Walker has delayed final entry of his judgement so he can hear arguments on whether to stay the ruling, pending appeal.
California Governor Arnold Schwarzenegger quickly welcomed Wednesday's judgement.
"For the hundreds of thousands of Californians in gay and lesbian households who are managing their day-to-day lives, this decision affirms the full legal protections and safeguards I believe everyone deserves," he said in a statement.
"At the same time, it provides an opportunity for all to consider our history of leading the way to the future, and our growing reputation of treating all people and their relationships with equal respect and dignity."
Speaker of the US House of Representatives Nancy Pelosi, who represents San Francisco, also hailed the ruling.
"Proposition 8 has taken away individual rights and freedoms, and is a stain upon the California Constitution," she said in a statement.
Supporters of the gay marriage ban vowed to appeal against the ruling.
Randy Thomasson, of the socially conservative group SaveCalifornia.com, described it as a "terrible blow" to voter rights.
"Judge Walker has ignored the written words of the constitution, which he swore to support and defend and be impartially faithful to, and has instead imposed his own homosexual agenda upon the voters, the parents and the children of California," he told the AFP news agency.
'Right to choose'
The 2008 ballot measure, known as Proposition 8, amended the California constitution to state that "only marriage between a man and a woman is valid or recognised in California".
Two same-sex couples challenged the measure, saying it violated their right to equal protection under the US constitution.
They said the measure violated gays' and lesbians' right to choose whom to marry while allowing it to heterosexuals.
Supporters of the ban said it affirmed the will of California voters to exclude same-sex couples from marriage and argued the state had an interest in promoting procreation within marriage.
In his ruling, Judge Walker permanently forbade enforcement of the same-sex marriage ban, finding that, "moral disapproval alone is an improper basis on which to deny rights to gay men and lesbians."
"Proposition 8 fails to advance any rational basis in singling out gay men and lesbians for denial of a marriage licence," he wrote.
"Indeed, the evidence shows Proposition 8 does nothing more than enshrine in the California constitution the notion that opposite sex couples are superior to same-sex couples.
"Because California has no interest in discriminating against gay men and lesbians, and because Proposition 8 prevents California from fulfilling its constitutional obligation to provide marriages on an equal basis, the court concludes that Proposition 8 is unconstitutional."