The very idea makes the mind reel: San Francisco, San Jose, Silicon Valley—all gone dark. The electric-car charging stations, the $500-a-plate sushi restaurants, the rows of workstations at Google, Uber, Facebook, Twitter, and Salesforce—all suddenly unplugged. This summer, blackouts could plunge large swaths of California into darkness—an act of deliberate policy, not equipment failure or operator errors.

Pacific Gas & Electric, Northern California’s largest power supplier, recently announced that it will begin shutting down parts of the grid, possibly for days at a time, to help reduce the risk of wildfires. Known as “de-energization,” the process sounds like a metaphor for societal collapse—a return to the Dark Ages—but the policy carries a certain perverse logic.

California has always had wildfires, but recent conflagrations have been particularly devastating. Last November’s Camp Fire burned over 150,000 acres, destroyed the town of Paradise, and killed 85 people, making it the deadliest fire in the state’s history. Like many large California wildfires, that one was sparked—quite literally—by an electric power line and then spread by intense winds. In past years, utilities have occasionally shut off power to certain portions of the grid on the windiest days. Through new rules, the state’s power regulators now permit PG&E and other utilities to shut off power to more customers during periods of elevated risk.

The shutdowns have already begun. In early June, PG&E cut off power to parts of Napa and other northern counties on a day when wind gusts reached as high as 71 miles per hour. De-energization traditionally affected people in rural areas, where local power lines traverse forests and scrublands. But PG&E has expanded the policy to the high-voltage lines that transmit power long distances and supply large cities. It seems absurd that the Bay Area, the global epicenter of high-tech industry, could lose power because of a windy day. But that’s the reality, and there are no quick solutions.

As with most vicious problems, the roots of the state’s power dilemma go back decades. For starters, the state is fire prone. “It’s a place that nature built to burn,” writes fire historian and Arizona State University professor Stephen J. Pyne. Almost all the region’s precipitation falls during the winter. By early summer, the hills are stocked with fuel and tinder-dry. And California’s federal and state lands are chronically undermanaged when it comes to controlled burns and reducing fuel loads. (President Trump evoked chuckles when, visiting the Camp Fire site, he described Finland’s superior forest management practices as “raking and cleaning.” Though inelegantly expressed, his recommendations reflected those of many wildfire experts.)

Then California’s ferocious winds, especially in late summer and fall, disrupt the usual flow of air off the Pacific: huge rivers of hot, bone-dry air from the state’s deserts and mountains rush unstoppably toward the coast. Known as the Santa Ana winds, the gusts can roar at 40 miles per hour or more for days at a time. Imagine a smoldering cigarette butt sitting on a pile of crumpled newspaper and being blasted by a hair drier—for hours on end—and you start to appreciate the havoc a single ember can wreak on the desiccated California landscape.

A wildfire that passes through uninhabited forests and grasslands doesn’t do much permanent damage. In fact, these ecosystems have evolved to benefit from occasional fires. In recent decades, though, California’s wild areas have filled up with people. (Though the media portrayed Paradise as a small town, the mountain community was actually home to 27,000 people. That’s roughly the population of New London, Connecticut) Even big cities bump up against wild country, with subdivisions filling mountain canyons and advancing into brushy deserts. Fire experts call these zones the “wildland-urban interface.” Nearly a third of California homes are built in these hard-to-protect areas.

Many California residents—especially retirees—are drawn to rural areas by the natural beauty. Who wouldn’t want to live in the Sierra foothills? But many also move to escape soaring housing costs in the state’s notoriously anti-development major cities. More people inhabiting the wildland-urban interface means more lives and structures placed at risk. As a result, today’s routine fires cause even more damage than those in the past. Disaster experts call this syndrome the “expanding bull’s-eye effect.” (We see the same problem in Florida, where beachfront overdevelopment means that even small hurricanes can inflict property damage costing billions.)

Where people go, power lines must follow. Utilities have no choice but to serve fire-prone communities. And power lines themselves vastly amplify the risk that fires will occur. Overgrown vegetation can cause short circuits and dead branches can ignite if they get blown into wires. In high winds, the lines themselves sometimes “slap” into each other and shower the ground below with sparks. Cal Fire, the state agency that manages wildfire policy, recently confirmed that a PG&E power line did indeed spark the Camp Fire blaze. “The booming industry up here in Butte County is the lawyers signing people up to sue PG&E,” a former Paradise town councilman said. PG&E says it has set over $10 billion aside to cover fire claims.

Liability for the Camp Fire is only the latest addition to PG&E’s fire-related woes. The company has estimated that its total exposure from fires in 2017 and 2018 could exceed $30 billion. In January, the company filed for Chapter 11 bankruptcy protection. Clearly, PG&E’s management of fire risks has been terribly inadequate. But the massive, power-line-related fires of the past two years call into question whether any utility could operate successfully in California’s more fire-prone regions.

The problem has as much to do with the state’s political and legal climate as its natural one: California subjects its utilities to a perverse legal doctrine called “inverse condemnation.” Under this rule, utilities are liable for any fire damage that involves their equipment—even if the utility itself was not negligent. In other words, a power company can follow every state safety regulation to the letter, but if a car knocks over a pole and the downed line ignites, the utility is on the hook for any ensuing damage. Utilities have had little luck convincing regulators to pass the costs of this exposure on to ratepayers. In 2017, for example, California’s Public Utilities Commission shot down San Diego Gas & Electric’s request to charge its customers for wildfire liabilities.

Ironically, San Diego Gas & Electric is one utility that has a good record of fire prevention. The company employs a team of meteorologists to monitor weather stations and advise on fire threats. Since 2013, the utility has shut down power to regions over a dozen times—none of the targeted areas reported major fires. Of course, power shut-downs bring big risks of their own. Many people rely on electrically powered medical equipment, or need to keep medications refrigerated. And when people start cranking up gasoline-powered generators, that adds a different type of fire hazard.

For now, though, other options are limited. Burying power lines in California’s rocky terrain could cost more than $2.6 million per mile; Bloomberg energy analyst James Sprinz estimates that burying all of PG&E’s overhead lines could exceed $67 billion. Some energy experts suggest that rural communities could create self-reliant mini-power grids using solar panel and batteries. But such solutions are decades away. In the meantime, California is hostage to a crisis of its own making. Cities that refuse to grow force populations into more rural, fire-prone areas. Now, to try to prevent those fires, the entire state’s power grid is subject to sporadic blackouts. That leaves everyone whistling down the wind.

Photo by Kevork Djansezian/Getty Images