When Erin Carder married her lesbian partner Kerri McCoy last week, a group of parents at the school where she teaches in San Francisco decided that their children should be allowed to share the big day.
As the newlywed couple walked down the steps of City Hall, 18 of Ms Carder's five and six-year-old pupils surprised them, throwing rose petals and blowing bubbles. To its organisers, the field trip represented what the headmistress Liz Jaroslow described as a "teachable moment" – an opportunity to educate the children about love, marriage, and the historic significance of same-sex weddings. Yet within hours, the school outing had been thrust to the centre of a delicately poised and increasingly bitter political battle over the future of gay marriage in California.
The state's supreme court overturned a ban on gay marriage in May, and since June couples of the same sex have been happily tying the knot. But on 4 November, as well as choosing a president, Californians are being asked to vote on an amendment to the state constitution – known as Proposition 8 – that would once more outlaw gay marriage.
Financed mostly by right-wing Christian groups, including the wealthy Mormon Church, supporters of Proposition 8 have made robust efforts to secure majority backing for a 15-word amendment which states: "Only a marriage between a man and a woman is valid or recognised in California." Their tactics so far have attempted to play to the fears of middle-class families who are thought most likely to turn out to vote on 4 November.
And that's how Erin and Kerri's wedding, co-starring the children from the Creative Arts Charter School, has ended up as a prime-time commercial. The attack ad – the latest headline-grabbing initiative by the Protect Marriage lobby group – claims that liberals are using gay marriage to indoctrinate vulnerable children in public schools.
"Mom, guess what I learned in school today?" asks one young actress in the commercial. "I learned how a prince married a prince, and how I can grow up to marry a princess!"
Chip White, a spokesman for Protect Marriage, said: "It's totally unreasonable that a first-grade field trip would be to a same-sex wedding.
"This is overt indoctrination of children who are too young to understand it."
Despite California's traditionally liberal leanings, the Protect Marriage campaign appears to be gaining ground. Recent polls, which had for months been tilted in favour of gay marriages, are now showing that 47 per cent of respondents are backing the amendment outlawing such unions, with 42 per cent opposed and the rest undecided.
The situation leaves 11,000 couples who have rushed to marry in California worried that their marriages might suddenly be declared null and void.
No On Eight, the group leading the battle against Proposition 8, admitted it had been caught off-guard by the size of the anti-gay-marriage advertising campaign, funded by $30m (£17m) of donations. In a belated effort to get the pro-gay-marriage campaign off the ground, No On Eight recently began recruiting Hollywood celebrities, securing $100,000 donations from Brad Pitt, and Steven Spielberg. This week, the film producer Steve Bing made a personal donation of $500,000.
On Tuesday, the business magnate Ron Burkle will host a major fundraiser at his home in Beverly Hills, at which Melissa Etheridge and Mary J Blige will perform. Guests include Barbra Streisand, and the chat-show host Ellen DeGeneres, who wed Portia de Rossi in August in one of the most high-profile same-sex unions.
The big question, of course, is whether this effort will turn out to be too little, too late. If it is, the state's large gay community faces an uncertain future.
"It will be uncharted territory," said Evan Wolfson of the organisation Freedom to Marry. "What we know from other examples of anti-gay attacks is that our opponents talk very soothingly before the process about how limited their individual measure is, and then once the legislation passes, they use it as a sweeping tool to discriminate and undermine all aspects of partnership protection."
On both sides, the campaign has so far been characterised by accusations of "dirty tricks". No On Eight has accused its opponents of attempting to stir up racial tension, while Protect Marriage's website carries allegations that its supporters have been threatened, and its campaign billboards vandalised.
"This was always going to be a close vote, and the anti-gay forces have poured in an unmentionable amount of money," said Mr Wolfson. "Their campaign has been far bigger than we ever planned for, and nobody anticipated the barrage of advertising. But I hope fairness will prevail."
Civil union The state milestones
*Vermont was the first state in the US to pass a civil union law back in 2000, offering a homosexual couple all the rights a heterosexual married couple would enjoy, without actually legalising same-sex marriages.
*It was not until November 2003 that a state gave legal approval to gay marriages. A court in Massachusetts ruled that banning homosexuals from civil marriage was against the constitution, propelling the issue into the national spotlight.
*Massachusetts issued its first licences in May 2004. Four years later, in July this year, the Governor signed a bill allowing gay couples from elsewhere in America to be married in the state.
*California became the second state in the US to allow gay marriage. The third was Connecticut – just last week, when a court ruled that civil unions were not an alternative, and that limiting gay couples to unions only was a violation of their rights. That part of theruling will be of particular interest to gay campaigners in New Hampshire and New Jersey – as well as Vermont – which currently allowcivil unions but not gaymarriage.