In this Feb. 14, 2021, file photo, woman walks through falling snow in San Antonio. Credit: Eric Gay / AP

AUSTIN, Texas — The recent blackouts that left 4 million Texas customers without electricity and heat during a deadly winter freeze also unplugged plants that could have generated more power, which was urgently needed as the state’s grid reached the breaking point, the head of a major energy corporation said Thursday.

Curtis Morgan, the CEO of Vistra Corp., told lawmakers at the outset of a public hearing on one of the worst blackouts in U.S. history that when officials from his company called utility providers, they were told they weren’t a priority.

“How can a power plant be at the bottom of the list of priorities?” Morgan said.

“You-know-what hit the fan, and everybody’s going, ‘You’re turning off my power plant?'” he said.

At least 40 people in Texas died as a result of the storm, and 10 days after the blackout started, more than 1 million people in the state were still under boil-water notices.

Lawmakers’ outrage fell heavily on the Electric Reliability Council of Texas, which manages the state’s grid. ERCOT has claimed that the scale of the forced blackouts — the largest in Texas history — averted an even more catastrophic failure that would have wiped out power to most of the state’s 30 million residents for months.

“Obviously what you did didn’t work,” said Democratic state Sen. John Whitmire of Houston, which had more than 1 million outages.

“It worked from keeping us [from] going into a blackout that we’d still be in today, that’s why we did it,” ERCOT president Bill Magness said. “Now it didn’t work for people’s lives, but it worked to preserve the integrity of the system.”

Among Vistra’s subsidiaries is Luminant, which operates nearly two dozen plants across Texas. Morgan blamed outdated lists of critical infrastructure in Texas for darkening gas processors and production sites as grid managers began shutting off parts of the system.

Morgan didn’t say how many of the company’s plants were turned off or for how long, but he did say the company was within three minutes of power going offline at one nuclear plant, and that the main power grid in America’s energy capital was just moments away from total collapse Feb. 15.

“We came dangerously close to losing the entire electric system,” Morgan said.

Of Texas’ power generators that were not operational during the storm, Magness said the freeze was responsible for 42 percent of the failures. A lack of fuel and equipment damage unrelated to the weather also contributed, but Magness said that for 38% of the plant outages, the problem remains unclear.

The outages lasted days for millions of Texas homes, and millions more lost water as water treatment plants shut down and miles of pipes burst across the state. The toll of the storm included at least 15 hypothermia-related deaths around Houston, said Democratic state Rep. Ana Hernandez, vice chairwoman of the House State Affairs committee.

President Joe Biden is set to fly to Texas on Friday in what would be his first visit to a major disaster site since taking office.

Morgan accused ERCOT of a lack of “urgency” as the storm approached. Republican Gov. Greg Abbott has laid much of the blame on ERCOT, which answers to a state utility commission that is led by Abbott appointees. At least six ERCOT board members, including the Chairwoman Sally Talberg, resigned this week ahead of the hearings.

A federal report after a 2011 deep freeze in Texas urged hardening electric generators against extreme cold, but neither the state’s Public Utility Commission nor ERCOT required plant owners to do anything more than file weatherization plans. There are no standards for what must be included in those plans.

The crisis has put Texas’ power and fossil fuel industry under heavy scrutiny from lawmakers who reap millions of dollars in unlimited political contributions from energy interests, more than any other sector.

Since 2017, Vistra Energy and its political action committee has donated more than $1.4 million to Texas politicians and groups associated with both political parties, according to state campaign finance records. Lawmakers also heard early Thursday from the top executive of NRG Energy, which has donated more than $405,000 since 2017, including $30,000 to Abbott.

Story by Paul J. Weber and David Koenig. Associated Press writer Jake Bleiberg contributed to this report.