SACRAMENTO (AP/CBS SF) — 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.

READ MORE: Vigil Set for Saturday in Santa Rosa to Bring Attention to Search for Missing Mom

PG&E filed a motion with the bankruptcy court outlining the company’s reorganization plan, while the Governor’s office filed a statement supportive of the proposed plan and PG&E’s compliance with Assembly Bill 1054.

“We appreciate the Governor’s statements in the Bankruptcy Court. We now look to the California Public Utilities Commission to approve the Plan through its established regulatory process, so that we can exit Chapter 11, pay wildfire victims fairly and as soon as possible, and participate in the State’s Wildfire Fund,” said CEO and President Bill Johnson in a statement released by the company.

READ MORE: Warriors, Chase Center to Require Fans Show Proof of COVID Booster Shots

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.”

MORE NEWS: Pacers Stun Curry, Warriors 121-117 in Overtime

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.