Just minutes ago, it looked like California’s referendum to legalise and tax marijuana, the “most widely used illicit substance in the world”, was heading for a defeat. Exit polls show a slim majority of people under age 40 voting in favour of the Control & Tax Cannabis Act but more voters over the age of 40 voting against the measure.

The initiative, which ran at the mid-to-high-40s in the polls, started to run out of steam during the pointy end of the campaign despite a huge infusion of cash from rich supporters such as billionaire George Soros, with polls showing a softening in support from Californian voters.

Proposition 19 (Prop19) was the result of a perfect storm of events in the famous US state. The highest incarceration rate in the Western world, partially due to a long running “War on Drugs” has made  decriminalisation a cause célèbre among libertarian and liberal voters. A massive budget crisis, including an annual shortfall of up to $40 billion, has muted opposition from a state government desperate for extra revenue. Also important has been the ability of ordinary citizens to force statewide and legally binding referenda by amassing 430,000 signatures, a number the proponents of marijuana use were able to easily amass in a state with an estimated 4 million regular smokers.

Both sides have run well-funded and well-targeted campaigns in what has been one of the most talked about referendums in American history.

With pre-election polls running at nearly a dead heat, and the radical nature of the proposal, interest inside and outside of California has been, well, high.

The “Yes on Prop 19” coalition, with more money, has been keen to use a wide range of people, from young  mothers to retired police officers, to promote the idea that the war on drugs has failed. Ads such as this one by retired a San Jose Police Chief state that in California, “it’s easier for a teenager to buy pot than beer” and “proposition 19 will tax and control marijuana just like alcohol”.

Opponents of the bill, including the California Chamber of Commerce, have run ads such as this one, evoking the spectre of a society filled with stoned workers. “Imagine coming out of surgery and the nurse caring for you was high — or having to work harder on your job to make up for a co-worker who shows up high on pot. It could happen in California if Proposition 19 passes”. Interestingly, some of the funding for the ads has come from the California Beer and Beverage Distributors, a trade association representing alcohol retailers.

Opposition from the various levels of government has been muted. Local governments such as Oakland City Council, the biggest beneficiaries of the proposal via increased tax revenue, have passed motions supporting the initiative.

The California state government, crippled by the recession, came out against the proposal but only after the Governator himself, Arnold Schwarzenegger said “it’s time to have a debate”. To blunt support for the proposition, Schwarzenegger last month decriminalised possession of the drug, replacing jail terms with a  $100 fine.

Only the US federal government, the single biggest spender on law enforcement against illicit drugs, and that faces a quagmire of conflicting interstate laws and compliance issues if the bill passes, has been unequivocal in its opposition to the proposal, with federal Attorney-General Eric Holder causing a stir by promising to override any resulting pro-marijuana laws. Perhaps sensing Obama’s exposed flank and the chance to gain some easy votes with a bit of populist libertarianism, 2012 presidential hopeful Sarah Palin has come out in support of legalisation.

If, after the rest of the votes are counted tonight, Prop19 is defeated it is difficult to see the pro-legalisation forces getting another ballot up in the near future. A similar defeat in the same state in 1972 took 38 years to overcome. Additionally, the conditions in California are unlikely to be so conducive next time, with the economic arguments for reform diluted as the economy recovers.

The near success of Prop19 shows that desperate communities consider desperate measures. If Australia’s economy was derailed by a crisis in the future, it would not be hard to imagine a desperate state government going down a similar regulate and tax path as our cousins in the Golden State.