Pacific Gas & Electric reworked a $13.5 billion settlement with victims of deadly wildfires blamed on the utility to try to prevent it from unraveling after California Governor Gavin Newsom rejected the company's financial rehabilitation plan. The revision discussed in a bankruptcy court hearing Tuesday removes a provision requiring Newsom to approve the deal as a key piece of PG&E's plan to emerge from bankruptcy protection by June 30.

The company must meet that deadline to qualify for coverage in a special fund state lawmakers approved last summer to help insulate utilities from losses caused by future wildfires ignited by outdated transmission lines.

Newsom had jeopardized the pivotal settlement with the victims of catastrophic wildfires during 2017 and 2018 when he refused to give it his blessing Friday as part of PG&E's bankruptcy plan.

The Democratic governor concluded that the settlement doesn't comply with state law. He believes the proposal doesn't include enough changes to enable PG&E to come out of bankruptcy with the financial wherewithal and expertise needed to provide safe and reliable service to its 16 million customers.

Get Breaking News Delivered to Your Inbox

Meanwhile, regulators announced a proposed $1.7 billion settlement over PG&E's role in igniting fires in 2017 and 2018 that means shareholders rather than ratepayers will have to pay for the company's "legal obligations to provide safe and reliable service."

The agreement — which still requires the bankruptcy court's approval — prevents the utility from recovering the $1.625 billion it expects to incur in legal costs from ratepayers and would fund an additional $50 million in efforts to improve operations, the California Public Utilities Commission said.

The settlement comes after the commission found the utility failed to sufficiently identify dead and dying trees, remove brush and dead trees that can spark wildfires, failed to patrol and maintain its electrical systems and disposed of maintenance evidence needed in the investigations.

In court, the wildfire victims' stance surprised U.S. Bankruptcy Judge Dennis Montali, who must approve both that settlement and PG&E's plan for getting out of bankruptcy. He spent part of Tuesday's regularly scheduled hearing grilling lawyers for Newsom, PG&E and the fire victims about what might happen if he approved the settlement despite the governor's misgivings about the company's overall reorganization plan.

Newsom's attorney, Nancy Mitchell, told Montali that the governor doesn't necessarily oppose the settlement with fire victims, although he still is convinced PG&E must make dramatic changes to its reorganization plan to gain the state's needed approval.

PG&E attorney Stephen Karotkin said the company believes it can modify its plans to appease Newsom and state regulators by June 30. PG&E executives and Newsom met Saturday to review the governor's objections, Karotkin said.

Among other things, Newsom is demanding that PG&E replace its entire 14-member board of directors, including CEO Bill Johnson, and earmark more money for improvements to its transmission system in the next decade.

He also wants the plan to make it easier for the state or local governments to mount a bid to take over PG&E and turn it into a nonprofit, customer-owned cooperative if the San Francisco company hasn't proven it can avoid the missteps that led it to declare bankruptcy in January.

Montali indicated he may approve the settlement with the fire victims.

He also gave approval for another group of victims to move forward with a civil trial against PG&E to determine liability — victims of the December 2016 Ghost Ship warehouse fire in Oakland, California, that killed 36 people.

Montali ruled that their lawsuits against PG&E can proceed, with the caveat that any damages would be capped at the amount of coverage remaining from PG&E's 2016 insurance policies so the utility won't have to drain its depleted finances even further.