A PG&E employee works in Paradise, California, on Jan. 22, 2019. PG&E Co., California's biggest utility owner, faces $30 billion in potential wildfire liabilities, and its bankruptcy plan has reverberated across the power industry. The states big utilities have seen their shares plunge since November's deadly Camp Fire, and PG&E's debt rating has been cut to junk status. Photographer: David Paul Morris/Bloomberg via Getty Images

Pacific Gas & Electric and California Gov. Gavin Newsom announced a deal Friday for the nation's largest utility to emerge from bankruptcy triggered by massive liabilities from wildfires.

The governor's office announced that PG&E agreed to overhaul its board and operations, and in addition it agreed to a process to put the company up for sale if it doesn't pull out of the most complex bankruptcy cases in U.S. history by June 30.

PG&E will commit billions of dollars in additional spending to prevent wildfires, meeting one of Newsom's critical demands for the bankruptcy plan.

"This is the end of business as usual for PG&E," Newsom said in a statement. "Through California's unprecedented intervention in the bankruptcy, we secured a totally transformed board and leadership structure for the company, real accountability tools to ensure safety and reliability and billions more in contributions from shareholders to ensure safety upgrades are achieved."

The utility's outdated system triggered a series of catastrophic wildfires in 2017 and 2018 that killed so many people and burned so many homes and businesses that the company had to file for bankruptcy early last year.