Rare statewide rolling power outages took place Friday, including in some Long Beach neighborhoods, as a heatwave continued to bake California.

The California Independent System Operator, which manages the state’s power grid, declared an emergency shortly after 6:30 p.m. Friday and directed utilities around the state to shed their power loads.

Long Beach city officials sent out an alert Friday night at about 9:30 p.m. notifying residents that Southern California Edison reported power outages throughout the region.

Robert Villegas, a spokesman for Southern California Edison, said 132,000 customers were affected as power was shut off for an hour intermittently between communities. Southern California Edison calls these rolling power outages extremely rare and that they are typically used as a last resort when there is a statewide emergency.

The emergency order was lifted just after 10 p.m. and power was restored.

Between the heatwave and wildfires currently raging in the San Gabriel Mountains, utilities were ordered to shut down power to some communities. The last time the state grid operators issued this type of alert was 2001.

“Extreme heat is really the driver behind this,” said Anne Gonzales, spokeswoman for the power grid operator.

Villegas said these controlled outages help ease the strain on the grid and prevent long-lasting issues.

State officials have not called for an alert Saturday, but they will monitor the supply and demand strains this weekend and the coming week. Temperatures in Los Angeles next week are predicted to rise above 90 degrees in a span of four days.

Associated Press contributed to this report.