California voters overturned same-sex marriage rights in a vote that stands to affect how the issue plays out elsewhere in the nation.

Proposition 8, which would establish marriage as a union between a man and a woman, passed with 52.1% of the vote, against 47.9% opposed, with 94.6% of precincts reporting. The approval marks a stunning upset in a $70 million campaign that just weeks ago looked to be running in favor of preserving gay marriage rights.

The...