SAN FRANCISCO (AP) — An irate California Gov. Gavin Newsom signed an emergency proclamation allowing some energy users and utilities to tap backup energy sources amid a days-long heatwave that has prompted rolling blackouts affecting hundreds of thousands of households.

Newsom also sent a letter demanding that the state energy commission, state public utilities commission, and the California Independent System Operator investigate broad energy blackouts over two days last week that he said occurred without prior warning or enough time to prepare.

He said residents battling a heatwave and a pandemic in which they’re encouraged to stay home as much as possible were left without the basic necessity of electricity.

Get the app: Download the CBS Sacramento News app for iOS and Android

Newsom said he was not informed until moments before the blackouts started and that the failure to anticipate and protect against the service disruptions was “unacceptable and unbefitting” of California.

Californians packed beaches and river banks over the weekend to cool off from scorching triple-digit temperature that raised the risk of more wildfires and fears of coronavirus spread.

READ: ‘Be Prepared For Rolling Outages’: Californians Urged To Use Less Electricity Next 4 Days

The unusually hot weather overwhelmed the state’s electrical grid, prompting the California Independent System Operator, which runs the grid, to warn of another electricity supply shortage Sunday, though that one was averted.

California ISO ordered the first rolling outages in nearly 20 years on Friday when it directed utilities around the state to shed their power loads. The state’s three biggest utilities — Pacific Gas & Electric, Southern California Edison and San Diego Gas and Electric — turned off power to more than 410,000 homes and businesses for about an hour at a time until the emergency declaration ended 3 1/2 hours later.

The ISO instituted a second, but shorter, rolling outage Saturday evening that cut power to more than 200,000 customers.

Customers are asked to reduce energy use, especially during peak evening hours, and have been told rolling outages may continue through Wednesday night.

California also still faces the threat of power outages to prevent wildfires. Thousands were without power for days last year when Pacific Gas & Electric and other utilities shut off lines amid high, dry winds in order to prevent wildfires.