PG&E, the largest utility in California, officially filed for Chapter 11 bankruptcy protection on Tuesday after announcing its intent to do so earlier this month.

What forced the company into this unsavory position is upward of $30 billion in liability after record-breaking deadly wildfires in 2017 and 2018 torched big swaths of California. Investigators have attributed more than 1,500 fires to PG&E power lines and hardware between June 2014 and December 2017, according to the Wall Street Journal. And PG&E equipment is a major suspect in the Camp Fire, an October blaze that killed 85 people and destroyed almost 14,000 homes, making it the deadliest and most destructive wildfire in state history.

The investor-owned utility had lost more than half of its stock value when it first announced its bankruptcy, with its market cap falling to $4.7 billion. As of Tuesday morning, the company’s market cap rose to $7.1 billion. PG&E employs 20,000 workers, serving 4.3 million natural gas customers and 5.4 million electricity customers (whose service will not be interrupted for now).

The bankruptcy is a major development in an ongoing showdown between the company and its regulator, the California Public Utilities Commission, and state legislators over who ultimately bears the costs for these disasters.

Protesters at the @californiapuc again today, this time speaking out about today’s emergency meeting to approve some PG&E bankruptcy financing-related measures pic.twitter.com/ZYOKsW4LZc — J.D. Morris (@thejdmorris) January 28, 2019

While PG&E may now be on the hook for huge damages, regulators limit how much of this they can pass on to their customers via electricity and gas rates. Yet we still don’t know what the precise implications of the bankruptcy are for customers. (The CPUC said no one was available to comment.)

But the fall of a major utility is also a chilling example of how the impacts of climate change can pummel US companies and taxpayers right now. And the risks are only growing.

Climate change is forcing utilities to change how they do business

Once upon a time, utilities were a relatively safe bet for shareholders. Utilities are tightly regulated, they sell things everyone needs, and their customer base is steady, if not growing. While some utilities placed some bad bets, the ones that stuck to their core products — gas, water, electricity — tended to do pretty well. PG&E was a case in point.

“If you asked a few years ago, I think people would have said it’s a good investment,” said Travis Kavulla, the former president of the National Association of Regulatory Utility Commissioners and now the director of energy policy at the R Street Institute.

Join the Vox Video Lab Go behind the scenes. Chat with creators. Support Vox video. Become a member of the Vox Video Lab on YouTube today. (Heads up: You might be asked to sign in to Google first.)

However, California is one of only a handful of states that hold utilities responsible for damage stemming from their equipment even in the course of normal operations. This wasn’t too much of an issue until multiple large fires started being traced back to PG&E hardware. This startled investors, who began pressuring lawmakers.

The California state legislature passed a law last year, Senate Bill 901, that allowed PG&E to pass the costs of its liability for the 2017 fires to its customers. PG&E estimated that it would cost an average customer an additional $5 per year for every $1 billion issued in bonds.

However, the law doesn’t cover the fires in 2018, and it’s unclear if state lawmakers want to rescue the utility again. If the company can’t pass the costs to its customers, then it’s PG&E investors who have to pay.

And this reckoning isn’t exclusive to California. Across the United States, the power sector is grappling with its vulnerabilities to climate change. Prolonged droughts have threatened the supply of cooling water for power plants. Extreme weather events have wiped out infrastructure, as we saw when Hurricane Maria shrouded Puerto Rico in the largest blackout in US history. Rising temperatures are fueling surging peak electricity demand in places like Texas, pushing power generation capacity to the limit as reserve margins get thinner.

“By far the most important environmental factor affecting [electricity transmission, storage, and distribution] infrastructure needs now and going forward is global climate change,” the US Department of Energy noted in its 2015 Quadrennial Energy Review.

The question now: How does a utility price in the risks of rising temperatures ahead of the next disaster and stay in business? When a utility like PG&E has to bear the costs of record-breaking wildfires, it effectively has to become an insurance company. That’s because in addition to being a utility, it has to manage and distribute risks of uncommon but devastating events.

“The answer, unfortunately, is that everyone has been caught so flat-footed by this episode that no one has thought seriously about that,” Kavulla said. “Do you socialize the risk, or do you expect private capital to bear it?”

Wildfires are still a growing threat to California and much of the western United States

Though wildfires are a natural part of forest ecosystems, human activity is a key driver of the increasing destruction from wildfires like the massive ones we’ve seen in the West lately. People ignite 84 percent of all wildfires, whether that’s from downed power lines, broken-down vehicles, or arson. This has tripled the length of the fire season and increased the burned area sevenfold compared to fires sparked by lightning.

But the devastation from these fires stems from more than just the sparks. California’s housing shortage and high property prices are increasingly forcing people to live closer to woodlands that are prone to burn.

More homes in and around forests mean more power lines running through trees. PG&E already operates 106,681 circuit miles of electric distribution lines and 18,466 circuit miles of interconnected transmission lines across 70,000 square miles of territory. That increases the likelihood of ignition as well as the number of people and properties in harm’s way. The Camp Fire alone is estimated to have caused upward of $16.5 billion in property damage.

So while PG&E equipment may have started fires, the equipment is in high fire risk zones to begin with because people live there. There are precautions the company can take — trimming trees, conducting regular maintenance — but trying to reduce fire risk to zero would be horrendously expensive. It can cost $1.4 million per mile to bury power lines in rural areas, compared to $174,000 per mile above ground. These costs would ultimately be passed on to power customers.

At the same time, decades of suppressing fires rather than allowing them to run their course in woodlands has paradoxically made them worse. Over time, fuel has accumulated to unnaturally high densities.

And humanity’s emissions of greenhouse gases are warming the planet, making some parts of it drier and more at risk of fire. Scientists have found that more than half the aridity in western US forests between 1979 and 2015 stems from warming induced by people. Drier forests are not only likelier to burn; they’re more vulnerable to pests like bark beetles. California is also still reeling from a major years-long drought, and the summers of 2017 and 2018 brought record heat to the state.

The drought, warming, and pests have converged to kill off more than 129 million trees across California.

With so many factors at play, it’s tricky to figure out who is to blame and, more importantly, who should pay for wildfires. And President Trump has threatened to cut off Federal Emergency Management Agency relief funds for fire victims, blaming the state’s forest management for the fires, even though most forest land in the state is maintained by the federal government and more federal acres burned in last year’s fires. Newly elected California Gov. Gavin Newsom now has to balance all these competing forces.

“Throughout the months ahead, I will be working with the Legislature and all stakeholders on a solution that ensures consumers have access to safe, affordable and reliable service, fire victims are treated fairly, and California can continue to make progress toward our climate goals,” he wrote in a statement.