When the nation's shale-drilling boom began six years ago, few Americans knew how oil and gas companies were able to extract such vast quantities of oil and gas with historic efficacy. Fewer, for that matter, even cared. 

Today, the industry's relentless pursuit of shale rock is hard to ignore. So too are the studies that link its preferred extraction technique, hydraulic fracturing ("fracking"), to water contamination, air pollution, earthquakes, and greenhouse gas emissions. These concerns have led dozens of local governments—from Colorado to New York and Pennsylvania—to ban fracking outright. Voters in two California counties and in Denton, Texas, may add to that tally next week, when they decide whether to outlaw fracking.

City and county-level ballot initiatives may seem like small beans, but the energy industry's response suggests otherwise. In each race, it's ludicrously outspending its opponents—fearful, perhaps, if these voters can beat the fracking industry at the ballot box, it would signal to other threatened communities that these sorts of fights are worth picking. 

Fossil fuel giants Chevron, Aera Energy, ExxonMobil, and Occidental, among others, have poured more than $7 million into a coalition—Californians for Energy Independence—fighting the proposed measures in California. In Santa Barbara County (pop. 435,700), opponents have raised over $5.7 million to fight the proposed ban, beating supporters by a roughly 19-1 margin.

That's a staggering amount of money—even in the prohibitively expensive American political climate. As supporters have pointed out, the amount raised in Santa Barbara is more than three times as much as it took on average to win a seat in the House last election cycle, according to Open Secrets. Indeed, industry spending on the ballot question far exceeds the amount raised in each of the state's 53 congressional races this fall. 

No polling data exists, but observers say the election's outcome is still up in the air. They point to the spending habits of energy companies and to previous state-level polls—in May, for instance, a poll commissioned by green groups found that more than two-thirds of Californians back a statewide moratorium.

Meanwhile, about 250 miles north in rural San Benito County (pop. 57,600), industry-backed forces are outspending local anti-fracking activists by a 15-1 margin. And yet, the race is going down to the wire. Environmentalists say they don't have the money to commission polls, but Kristina Chavez Wyatt, the president of a third-party firm Farmhouse Communications that has helped conduct polling for the energy industry, told me the race is "close." (She would not share specific numbers but stressed that many voters were misinformed about the measure.)  

In Denton, Texas—a college town of 123,000 people in the heart of the Barnett Shale, where the nation's fracking boom took off—the energy industry has raised about $231,000, according to the latest data, about five times more than supporters of "Pass The Ban." The measure's opponents haven't publicly disclosed their polling data, but the chairwoman of the pro-drilling Denton County Republican Party told the New York Times earlier this month, "If the election were held today, we would lose." 

That race has gotten nasty. Two activists from the group Frack Free Denton received death threats. A pro-drilling website run by two local men charges local anti-fracking activists of having ties to the Kremlin. (Some of the activists have appeared on RT, the Russian state-funded news channel.) "I don't even know anyone from Russia and I'm a seventh-generation Texan," says Sharon Wilson, one of the accused. "If I had to predict before they buried us in money, I would say we would have easily won. Now I think it will closer but I still think we'll win."

That these races remain so tight—in spite of the colossal spending gaps—speaks to a truth that America's top oil and gas CEOs know all too well, even if they won't publicly say it: Opposition to fracking is mounting across the country.

More Americans now oppose the drilling practice than support it, according to the latest Pew Research poll on the subject, which documented an 11-point swing over last year alone. In the face of such data, the industry's favorite smear—that its critics are aloof, privileged, city-dwelling liberals—simply doesn't hold up anymore. Opposition has grown in the South and the West, too, including in deep-red Texas. 

It's no coincidence these are spots where the fracking industry is either already active or wants to start drilling. As the industry expands, disapproval mounts. For instance, as recently as March 2012, Texans backed fracking by a 48-36 margin, according to polling from UT-Austin. This March, UT-Austin pollsters found that lead had shrunk to 42-41. 

The industry's abstract talk about "energy independence" is proving no match for NIMBYism: Few people of any political persuasion would welcome drillers in their own neighborhood. "Even if you believe we have to have this energy, even if you buy into all that," Wilson says, "when it starts affecting you so profoundly in your own backyard, then you start to question."

Correction: A previous version of this article misstated the population of Santa Barbara County. The city of Santa Barbara's population is 90,400. The county's is 435,700.