After a heated, divisive campaign, fueled by a record $73 million of spending, California voters Tuesday were backing Proposition 8, which would change the state Constitution to ban same-sex marriage.

With more than half the vote counted, the measure was piling up huge margins in the Central Valley, but losing in every Bay Area county but Solano.

Six months after the California Supreme Court cleared the way for gay and lesbian couples to wed, the estimated 18,000 same-sex couples who took advantage of the landmark decision now wonder if they will be the last.

Opponents of the measure, gathered at the Westin St. Francis Hotel in San Francisco, tried to put the best face on the disappointing results.

LATEST NEWS VIDEOS

Now Playing:
  • Now Playing
    Santa Rosa Hilton hotel burns in Tubbs Firesfgate
  • Trump is Investing and Losing Millions on His Scottish Golf CourseBuzz60
  • Half of Santa Rosa neighborhood suffers fire damage, the other does notKTVU
  • Smoky sunrise over San Franciscosfgate
  • Homes destroyed in Tubbs FireKTVU
  • Hepatitis A Outbreak Spreading Across CaliforniaBuzz60
  • TODAY'S FORECAST: High fire danger, low humidityKTVU
  • 'I've never seen anything like this but on television:' Santa Rosa man on raging fireFox9
  • Firefighter battles wind and flamessfgate
  • 2013 Court Document Reveals Vegas Shooter’s Unusual BehaviorsGeoBeats

"There are a lot of votes still to count, and we expect the race to go on late tonight and possibly beyond," said Geoff Kors, executive director of Equality California, the guiding force behind the "No on Prop. 8" campaign.

Election officials estimated there could be as many as 2 million ballots left to count after election day, mainly from mail ballots that arrived Tuesday.

Supporters of the ban stayed cautiously optimistic.

"We're confident voters did go to the polls to vote 'yes' to protect traditional marriage," said Chip White, a spokesman for the Prop. 8 campaign.

Same-sex marriage bans won easily Tuesday night in Florida and Arizona. It was a rematch in Arizona, which in 2006 became the only state to ever reject a ban on same-sex marriage.

The campaign in California pitted those who argued that a same-sex marriage ban was nothing more than outdated discrimination against gays and lesbians, and conservatives and Christian groups who countered that the state and the courts have no right to unilaterally change a definition of marriage that has existed for centuries.

The flood of dollars that poured into the state from every part of the country made Prop. 8 the most expensive social issue race the nation has ever seen. And behind every one of those checks was someone desperately worried about what the election result could mean to them and their state.

To San Francisco Mayor Gavin Newsom and other opponents of Prop. 8, as well as to religious groups who backed the measure, the proposed ban on same-sex marriage was the second-most-important election in the country Tuesday.

The Prop. 8 battle, born in San Francisco, came eight years after more than 61 percent of California voters came out in favor of Prop. 22, which banned same-sex marriage in the state. But supporters had little time to savor the victory.

In 2004, Newsom set off a political and social explosion when he ordered marriage licenses issued to same-sex couples in the city. Gay and lesbian couples flocked to the city, showing up in wedding dresses and tuxes for the chance to be legally married. Despite outraged reaction from across the state and nation, Newsom didn't back down until a court ordered the city to stop issuing the same-sex licenses.

In 2005 and 2007, the Legislature passed bills that would have allowed same-sex marriage, but Gov. Arnold Schwarzenegger vetoed them. In 2006, the state Supreme Court voted unanimously to hear several challenges to same-sex marriage and rule on them.

Opponents of same-sex marriage were ready with a challenge that became Prop. 8.

Worried that a governor after Schwarzenegger would sign a same-sex marriage bill or that the court would rule against them, Prop. 22 supporters began putting together another initiative drive to make the same-sex marriage ban part of the California Constitution, beyond the reach of either the Legislature or the courts. They raised the money and gathered more than 1.1 million signatures by this spring.

On May 15, the state Supreme Court cleared the way for same-sex marriage. The court voted 4-3 to overturn Prop. 22 and the same-sex marriage ban, ruling that the state Constitution provided a right to marry that extends to same-sex couples. The three dissenting justices argued that it was up to the voters or the Legislature, not the court, to permit same-sex marriage, a view quickly taken up by opponents of the ruling.

"Four judges ignored 4 million voters and imposed same-sex marriage on California," Prop. 8 supporters said in a TV ad. "It's no longer about tolerance. Acceptance of gay marriage is now mandatory."

It was an argument that continued all the way to election day.

But with same-sex marriage legal in California, opponents of Prop. 8 could run a totally different campaign from the type that had lost virtually every election over the issue across the nation.

Rather than arguing for same-sex marriage, opponents took the moral high ground atop the Supreme Court decision and argued that a vote for Prop. 8 was a vote for discrimination. They got another bit of help when state Attorney General Jerry Brown ordered the Prop. 8 ballot language changed to say that it "eliminates the rights of same-sex couples to marry."

Prop. 8 backers charged that politics, not legal rectitude, was behind Brown's decision. They went to court, but lost.

That allowed Prop. 8 opponents, worried that many voters were not enamored with the idea of same-sex marriage, to run a TV campaign that almost never mentioned gays or lesbians or showed them in an ad. Instead, the ads charged that Prop. 8 supporters wanted to take away rights from a single, unnamed group of people, which just wasn't fair.

"Proposition 8 would be a terrible mistake for California," Sen. Dianne Feinstein said in a "No on Prop. 8" ad in the final week of the campaign. "It's about discrimination, and we must always say no to that."

That pitch also was a big help for the Democratic presidential ticket. Both Barack Obama and Joe Biden could give 100 percent support to the campaign's efforts to preserve rights, even though neither of them supports same-sex marriage.

Middle-of-the-road voters were the prize in the campaign, and both sides geared their efforts toward grabbing them.

"There are about 40 percent of the voters on each side, and nothing will move them," said Steve Smith, political consultant for the "No on Prop. 8" effort. "Then there's the other 20 percent that seems to change their mind every day. That's who we concentrate on."

The fight for undecided voters left each side battling around the edges of an issue that seemed straightforward enough: Should gay and lesbian couples be allowed to marry in California?