One hundred and forty-three years after the first gusher spewed forth in California, it still comes as a surprise to people that the state produces as much oil as Alaska — and in some years even more. Oil production in California has been hidden on high school campuses, tucked in behind housing developments, surrounded by almond orchards. It pushes up against neighborhoods in Los Angeles, where heat, time and tectonic forces turned the remains of Miocene marine life into vast reserves of oil. It occupies the flatlands of the Central Valley, where in some places pumpjacks spread out for as far as the eye can see.

California oil has lifted people out of poverty and helped the nation win wars; it has built a $14 billion economy in the Central Valley that directly or indirectly provides more than 60,000 jobs. Though it accounts for only 3% of the state’s economy, it has defined California’s culture perhaps more than has any other industry. The Golden State’s true gold came not in the form of yellow rock, but from the pale-greenish shale and drab gray sandstone that oozed the liquid hydrocarbon we call petroleum.

But now, in the spring of 2019, the future of California’s oil industry hangs in the balance — and not only because the public has become increasingly aware of petroleum’s role in altering the climate. The people who live in communities on the frontlines of oil production have also come to understand how the process of extracting fossil fuels from the ground endangers their health. Studies have linked living in close proximity to oil production to premature birth and low-birth weight babies, respiratory illness and even, in some cases, cancer.

A recent report from the California Water Quality Control Board found “multiple lines of geochemical evidence” indicating that “groundwater is mixing with oil field fluids.”

“The report is a stark reminder of the dangers of oil and gas,” says Hollin Kretzmann, senior attorney at the Center for Biological Diversity’s Climate Law Institute. “It piles on top of existing studies that show oil and gas as the cause of pollution as a risk to human health.”

And California oil production is uniquely treacherous. “People tend to think all oils are the same, but they’re not,” says Deborah Gordon, a senior fellow at Brown University’s Watson Institute for International and Public Affairs, and a noted expert in the climate burden of global petroleum production. Oil in the San Joaquin Valley typically has a higher carbon-to-hydrogen ratio than does oil from, for instance, North Dakota’s Bakken Formation. It requires more energy to refine into gasoline, and emits more pollutants in the process. It also lies in deep folds and comes out thick and viscous, like peanut butter, Gordon says. “It needs what’s known as ‘enhanced recovery techniques,’ and it always has.” Enhanced techniques can mean hydraulic fracturing — cracking apart source rock with a high-pressure slurry of sand and chemicals. It can also involve flooding stubborn wells with water or steam to liquify the oil and coax it to the surface. (Drillers use similar techniques to recover the last dregs of crude in aging fields, of which California has many.)

Enhanced recovery intensifies the climate impact of California’s oil. Steam, in particular, has to be heated, usually with natural gas. Often the amount of energy it takes to extract a barrel of oil exceeds the amount of energy contained in the oil. According to the Carnegie Endowment’s Oil-Climate Index, which Gordon helped develop, a barrel of oil from California’s Midway-Sunset field is second only to a barrel of dense bitumen from Canada’s Athabascan oil sands when it comes to its greenhouse-gas load. Enhanced techniques can also pollute local water supplies, as can conventional oil production, which yields briny wastewater, known as “produced water,” along with the oil. Produced water is sometimes disposed of in ponds, other times in injection wells designed for that purpose. Neither is completely failsafe.

“Past civilizations have ended because they salted up their soil,” warns Tom Frantz, an almond farmer and environmental activist who lives in the Kern County city of Shafter. Polluting water used for drinking and irrigation “doesn’t seem logical if you’re thinking seven generations down the road.”

Like a lot of California climate activists, Frantz would like to see the oil industry shut down — not right away and all at once, but over time. He’d like to see drillers prove they won’t put more energy into extracting oil than the oil itself will yield, as is often the case with steam injection and hydraulic fracturing. State regulators could decide whether to grant new permits based on “energy computations,” he says. “If the ratio of energy in to energy out is too high, they’d say ‘no.’”

The California oil industry will not easily concede to such demands. The industry’s main lobbying group, the Western States Petroleum Association, spent nearly $16 million persuading legislators to vote their way in the 2017 to 2018 legislative session. Chevron invested another $14 million. No other industry’s lobbying expenditures even came close.

Defenders of California’s oil industry are quick to point out that even if you closed down California production tomorrow, you’d make only a negligible dent in the global atmosphere’s greenhouse gas concentration. “We shouldn’t penalize local producers for issues that might be well beyond our control,” says Mike Umbro, an oil producer in Kern County’s North Belridge field who also consults with other producers about environmental regulation. California only produces one-third of the oil it consumes, Umbro notes. And “the alternative to California crude is more oil from Saudi Arabia. “Those foreign producers have far less regulation to deal with and far fewer environmental safeguards.”

Even Gordon points out that, for all the miles Californians drive, oil doesn’t just get burned in gas tanks. “Your drugs, your chemicals, your plastic; every bit of goods that gets shipped to California from across the ocean” — all consume oil in multiple ways.

Kretzmann counters that California can reduce demand along with supply, for instance by encouraging more electric cars powered by an ever-cleaner grid. Nor is it accurate, he says, to address climate concern as apart from more acute and immediate local impacts. “You can care about the particulate matter that’s getting into to your kids’ lungs at the same time that you can care about the carbon dioxide that’s heating up our planet. It’s not an either-or.”

When City Council members in the Kern County city of Arvin voted to require new oil production to be sited more than 300 feet from homes, schools, hospitals and parks, they did so not so much for the climate but for the sake of their constituents’ health and safety. After a 2014 gas leak from an oil production facility forced three dozen residents to evacuate, the Fresno-based Central California Environmental Justice Network installed air monitors around the city and combined them with infrared footage of emissions from oil facilities.

“We were able to present them with three years of air quality data from multiple locations showing oil and gas operations polluting fenceline communities,” says Gustavo Aguirre, Jr., the project’s coordinator.

Arvin is downwind of nearly every source of pollution Kern County has to offer, including two freeways heavy with truck traffic, the dust industrial agriculture kicks up and the airborne contaminants that drift in from all phases of oil production — many of them, such as benzene and toluene, known carcinogens. A 300-foot setback may not make much difference to local air quality. But for a small farm town to go up against the well-funded oil lobby and win “is a remarkable achievement,” Kretzmann says, and bodes well for future legislation. Right now, a bill is pending in the California Senate would establish a 2,500-foot buffer zone for oil and gas facilities statewide, a number consistent with scientific recommendations for protecting public health.

Not everyone on the oil side is opposed. “People living in city environments have every right to push for the highest environmental standards,” including setbacks, Umbro says. But Aguirre, who serves on two state independent review panels monitoring industrial pollution, expects a tough fight.

“It’s going to be — not even David and Goliath. It’s going to be David against some intergalactic superpower.” But he has faith that public health will ultimately prevail. “We’re not fighting money with money,” he says. “We’re fighting money with logic and science.”