File: The sun rises over an oil field over the Monterey Shale formation where gas and oil extraction using hydraulic fracturing, or fracking, is on the verge of a boom on March 24, 2014 near Lost Hills, California.  (Photo by David McNew/Getty Images)

Update: An earlier version of this story identified the wrong county in the headline. The initiative is on the ballot in Santa Barbara County.

A local ballot initiative in Santa Barbara that would prohibit some forms of energy extraction, including hydraulic fracturing, has attracted the attention of the oil and gas industry — making it one of the most expensive local ballot initiatives in history.

The initiative, Measure P, would ban what it dubs “high-intensity petroleum operations,” including practices like fracking and acid well stimulation treatments, from unincorporated land inside Santa Barbara County. It has backing from environmental groups like the Sierra Club and the Community Environmental Council, unions and the Democratic Party.

Energy companies operate more than 1,100 deep wells to extract oil from shale deposits. About two-thirds of those wells could be forced to use other means of extraction — like steam extraction — if the measure passes. One producer, Pacific Coast Energy Co., extracts about 3,500 barrels of oil per day. Opponents say the measure would cost more than 1,000 jobs, and $16 million in tax revenue for local governments.

The energy companies that stand to lose out are pouring millions into the fight against Measure P. Chevron has contributed more than $2.5 million to Californians for Energy Independence, Including Energy Producers, the main opposition organization. Aera Energy LLC added almost $2.1 million, and Occidental Petrolum threw in another $2 million, according to records filed with the California Secretary of State’s office.

In total, energy companies have poured $7.6 million into the campaign against Measure P. Supporters have raised about $300,000, most of it from environmentalists and individuals. The total combined spending, around $8 million, amounts to more than $18 for every one of the 435,697 people who live in Santa Barbara County.

“What’s going on in Santa Barbara County is unprecedented. The millions of dollars of outside money being spent against Measure P are an order of magnitude greater than has ever been spent against a local ballot measure here,” state Sen. Hannah Beth Jackson (D), who supports Measure P, said in a statement.

The money spent makes Santa Barbara’s initiative one of the more costly on the ballot this year. Across the country, a handful of ballot measures are expected to attract tens of millions in spending — including two ballot initiatives in California that pit trial lawyers against doctors and ballot measures in Colorado and Oregon that would mandate labels on foods that use genetically modified ingredients.

Another local initiative in California, a proposed tax on sugary drinks in San Francisco, has attracted even more spending than the anti-fracking legislation. Companies tied to the American Beverage Industry have spent $7.7 million to defeat that measure, Proposition E, which would levy a 2-cents per ounce tax on sodas.