(Bloomberg) -- The biggest utility bankruptcy in U.S. history appears to be drawing to a close after PG&E Corp. reached a deal with California Governor Gavin Newsom over the company’s restructuring plan.

The agreement calls for PG&E to put itself up for sale if the bankruptcy court doesn’t approve its plan by June 30 or if the company fails to emerge from Chapter 11 by the end of the year, according to a statement Friday. The deal also requires the embattled utility to overhaul its board and submit to additional state oversight.

“This is the end of business as usual for PG&E,” Newsom said in a statement. “We secured a totally transformed board and leadership structure for the company.”

PG&E shares rose as much as 17% after the close of regular trading Friday.

PG&E has struggled for months to craft a reorganization proposal that would satisfy both creditors and state officials after filing for Chapter 11 last year facing $30 billion in damages from wildfires blamed on its power lines. The consent from Newsom, who objected to earlier versions of PG&E’s turnaround plan, greatly boosts the odds the utility will exit bankruptcy by a state deadline of June 30.

© Photographer: Justin Sullivan/Getty Images North America Rapidly-Spreading Wildfire In California's Butte County Prompts Evacuations

A firefighter battles the 2018 Camp Fire in Northern California.

(Photo by Justin Sullivan/Getty Images)

It’s unclear exactly how the collapse in markets around the world brought on by the coronavirus outbreak might affect PG&E’s plans to emerge from bankruptcy by the state-imposed deadline and whether that could affect its financing.

PG&E Chief Executive Officer Bill Johnson said the company appreciates the governor’s support. “We now look to the California Public Utilities Commission to approve the plan,” Johnson said in the statement.

PG&E also agreed to freeze its dividends for about three years, which will contribute an estimated $4 billion in equity that, among other things, can help pay down debt. It also agreed to use shareholder funds to offset charges to customers bills for a $7.5 billion securitization designed to speed up payments to fire victims.

The deal with Newsom comes as the governor and other officials have turned nearly all their attention to fighting the coronavirus. California has been one of the U.S. centers of the pandemic. Newsom on Thursday took the dramatic step of ordering all residents to isolate themselves at home to limit the virus’s spread.

Read More: PG&E Glides Toward Bankruptcy Exit While State Fights Virus

Previously, the utility had pledged reforms including replacing some directors, tying executive pay more closely to safety metrics and dividing up its operations into regional units to better respond to local concerns.

PG&E will also have to submit to a proposal that could lead to a state takeover of the company if it fails to make safety improvements over time. And it must allow a state-appointed “operational observer” to oversee the company’s progress on safety before exits bankruptcy.

PG&E already had made peace with bondholders including Elliott Management Corp. and Pacific Investment Management Corp., which had been threatening to take over the utility with a rival restructuring proposal. Previously, the company struck settlements with wildfire victims, their insurers and local government agencies affected by the blazes.

PG&E’s reorganization still needs approval from the judge overseeing its bankruptcy and from the state utility commission, whose members are appointed by the governor.

For more articles like this, please visit us at bloomberg.com

©2020 Bloomberg L.P.