Image caption The judge found "California has no interest in discriminating" against gays and lesbians

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%.

Analysis The implications of the case go far beyond California. Advocates of a ban say they will appeal against this latest ruling; it's the next step in a court battle that could ultimately be decided by the US Supreme Court. The Supreme Court could then create a rule that binds all Americans. But it certainly won't unite them. Five other US states and Washington DC currently allow gay marriage, though polls indicate a slim majority of Americans oppose it. Gay groups argue this is a civil rights issue as important as the legal battle 40 years ago that ended the ban on interracial marriage.

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.

Same-sex marriage in the US Connecticut, Iowa, Massachusetts, New Hampshire, Vermont and Washington DC allow it

Maryland and New York recognise same-sex marriages from other states

Four other states provide civil unions that are legally equivalent to marriage

29 states have constitutional amendments banning same-sex marriage Sources: Human Rights Campaign, Lambda Legal

"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."