(Bloomberg) -- California’s electricity crisis has deepened as a heat wave gives way to wind storms, prompting the state’s largest utility to say it expects to cut power to more than 500,000 people this week to prevent live wires from sparking wildfires.

The shutoffs by PG&E Corp. are the latest in a tumultuous run for the disaster-weary state, where climate change makes weather ever more extreme. Last month, a record-breaking heat wave triggered California’s first rotating blackouts since the 2001 energy crisis. Next came a rash of wildfires.

And now, as a second round of ferocious temperatures abates, winds sweeping off the Pacific Ocean threaten to trigger even more blazes. PG&E, which filed for bankruptcy last year after its equipment sparked deadly wildfires, warned the shutoffs could impact portions of 22 counties from late Monday through Wednesday in the Sierra foothills and North Bay.

PG&E, which emerged from Chapter 11 in July after agreeing to pay $25.5 billion to settle wildfire lawsuits, said preemptive shutoffs starting Monday could leave about 172,000 homes and businesses in the dark. That could impact up to 516,000 people, based on the size of the average California household.

Shutoffs for about 104,000 customers are expected to start at 9 p.m. local time on Monday, with the remainder going down in two phases Tuesday. All customers are expected to be restored by 7 p.m. Wednesday.

California narrowly escaped rotating blackouts Saturday and Sunday, as temperatures soared past 100 degrees Fahrenheit (38 degrees Celsius) in much of the state, squeezing the power grid to its brink. The fires only made things worse, taking down power plants and transmission lines, cutting power to 70,000 homes and businesses.

While temperatures were lower Monday in some areas, officials said were still concerned about getting through the afternoon, in part because of the fires.

“It’s still pushing to the limit,” John Phipps, director of real-time operations for the organization that runs California’s grid, said during a news conference Monday afternoon.

The heat is poised to ebb only slightly Tuesday. Sacramento is forecast to hit 97. Oakland will be 91. And Los Angeles will be 87.

One thing that has made California’s grid so vulnerable is its rapid shift away from natural gas. About 9 gigawatts of gas generation, enough to power 6.8 million homes, have been retired over the past five years as the state turns increasingly to renewables, according to BloombergNEF. That leaves fewer options when the sun sets and solar production wanes. The state’s utilities have commissioned large batteries to pick up the slack but most haven’t been installed yet.

Wildfires sparked by falling power lines are another issue altogether. High-wind warnings are in effect in much of Northern California through Wednesday morning, raising the risk of blazes.

The latest blazes are already wreaking havoc on the grid. The Creek Fire in the Sierra Nevada Mountains, which has scorched more than 78,000 acres, knocked out transmission from a hydro plant on Saturday.

September and October typically mark the peak of California’s fire season, when plants have been sapped of moisture by the state’s dry summer. Rains most often return in October or November.

Last year, when California’s utilities first began carrying out widespread blackouts like this, some homes and businesses were left in the dark for days. That drew outrage from state and local officials, triggered investigations and prompted PG&E to reassess the scope of future shutoffs. The company has taken steps to limit the size and duration of outages, including putting wires underground in some locations.

©2020 Bloomberg L.P.