Gay rights activists Stuart Gaffney, left, and John Lewis walk outside the San Francisco city hall building where they married this past summer, in San Francisco on Wednesday. ((Marcio Jose Sanchez/Associated Press))

Voters put a stop to same-sex marriage in California on Tuesday, dealing a crushing defeat to gay-rights activists and putting in doubt as many as 18,000 same-sex marriages conducted since a court ruling made them legal this year.

The gay-rights movement had a rough election elsewhere as well.

Ban-gay-marriage amendments were approved in Arizona and Florida, and Arkansas voters approved a measure banning unmarried couples from serving as adoptive or foster parents. Supporters of the Arkansas measure made clear that gays and lesbians were their main target.

But California, the nation's most populous state, had been the big prize. Spending for and against Proposition 8 reached $74 million US, the most expensive social-issues campaign in U.S. history and the most expensive campaign this year outside the race for the White House. Activists on both sides of the issue saw the measure as critical to building momentum for their causes.

"People believe in the institution of marriage," Frank Schubert, co-manager of the Yes on 8 campaign said after declaring victory early Wednesday.

"It's one institution that crosses ethnic divides, that crosses partisan divides .… People have stood up because they care about marriage and they care a great deal."

California measure gets 52% support

With almost all precincts reporting in California, election returns showed the measure winning with 52 per cent. An estimated two million to three million provisional and absentee ballots remained to be tallied, but based on trends and the locations of the votes still outstanding, the margin of support in favour of the initiative was secure.

Exit polls for the Associated Press found that Proposition 8 received critical support from black voters who flocked to the polls to support Barack Obama for president. About seven in 10 blacks voted in favor of the ban, while Latinos also supported it and whites were split.

Californians overwhelmingly passed a same-sex marriage ban in 2000, but gay-rights supporters had hoped public opinion on the issue had shifted enough for this year's measure to be rejected.   

"We pick ourselves up and trudge on," said Kate Kendell, executive director of the National Center for Lesbian Rights.

"There has been enormous movement in favour of full equality in eight short years. That is the direction this is heading, and if it's not today or it's not tomorrow, it will be soon."

The constitutional amendment limits marriage to heterosexual couples, nullifying the California Supreme Court decision that had made same-sex marriages legal in the state since June.  

Existing marriages still valid, state says

About 18,000 gay couples have married in California. The state attorney general, Jerry Brown, has said those marriages will remain valid, although legal challenges are possible.

Kate Folmar, a spokeswoman for Secretary of State Debra Bowen, said initiatives typically take effect the day after an election, although the results from Tuesday's races will not be certified until Dec. 13.

Dana Simas, a spokeswoman for Brown, said the attorney general's office has yet to decide whether same-sex marriages already scheduled for after election day would be valid.

Gay-rights legal groups filed a petition Wednesday asking the Supreme Court to invalidate Proposition 8 on the grounds that voters did not have the authority to make such a dramatic change in state law without approval from the legislature. The court refused to hear a similar petition in June, when gay-rights activists tried to knock the measure off the ballot.

Elsewhere, voters in Colorado and South Dakota rejected measures that could have led to sweeping bans of abortion, and Washington became only the second state — after Oregon — to offer terminally ill people the option of physician-assisted suicide.

Washington's initiative, modeled after Oregon's "Death with Dignity" law, allows a terminally ill person to be prescribed lethal medication they can administer to themselves. Since Oregon's law took effect in 1997, more than 340 people — mostly ailing with cancer — have used it to end their lives.

The marijuana reform movement won two prized victories, with Massachusetts voters decriminalizing possession of small of the drug (an ounce or less) and Michigan joining 12 other states in allowing use of pot for medical purposes.

Energy measures met a mixed fate. In Missouri, voters approved a measure requiring the state's three investor-owned electric utilities to get 15 per cent of their electricity from renewable sources by 2021. But California voters defeated an even more ambitious measure that would have required the state's utilities to generate half their electricity from windmills, solar systems, geothermal reserves and other renewable sources by 2025.

Two animal-welfare measures passed — a ban on dog racing in Massachusetts, and a proposition in California that outlaws cramped cages for egg-laying chickens.

In San Francisco, an eye-catching local measure — to bar arrests for prostitution — was soundly rejected. Police and political leaders said it would hamper the fight against sex trafficking. And in San Diego, voters decided to make permanent a ban on alcohol consumption on city beaches.