SAN FRANCISCO - Pacific Gas and Electric is pledging to overhaul its board of directors in an attempt to avoid a potential takeover by the state of California and prove the nation’s largest utility is turning over a new leaf as it works through its second bankruptcy in less than 20 years.

The promise to shake things up came late Friday as the San Francisco-based company filed its latest blueprint for getting out of bankruptcy court by June 30. But to make that deadline, PG&E still must win over Gov. Gavin Newsom, who has been insisting for months that the company must make more radical changes to a corporate culture that has repeated lapses in safety and played a role a series of catastrophic wildfires that drove the utility back into bankruptcy last year.

Newsom had become so exasperated with the PG&E’s direction that earlier this week he vowed to follow through on a threat to launch a government-led takeover bid unless the company bowed to a series of demands he laid out in a Dec. 13 letter and has reiterated in the past two weeks. The list includes Newsom’s insistence that it replace its entire 14-member board of directors, including CEO Bill Johnson, and come up with a plan that lessens its debt load so it can pay for $40 billion to $50 billion in anticipated improvements to its outdated electrical grid.

PG&E appears to be starting to bend to Newsom’s will, but it’s still not clear if the company is willing to go far enough to appease him. In its announcement and court filings, PG&E pledged to “refresh” its board before it emerges from bankruptcy, but didn’t say whether it will comply with Newsom’s insistence to oust the entire board. All but two of the current 14 directors have joined the board since last April.

The plan also still relies on a heavy debt load, although PG&E expects to save money over the long haul through refinancing. It also shifts more debt from the holding company to the subsidiary that runs the utility in another apparent attempt to placate Newsom.

The governor’s representatives didn’t immediately respond to a request for comment Saturday.

Newsom holds unusual leverage over PG&E’s fate because the company needs the support of him and its chief regulator in California to qualify for coverage from a wildfire insurance fund that the state set up last summer. The protection from the fund is a crucial part of the plan that PG&E drew up after being confronted with more than $50 billion in claimed losses for deadly wildfires during 2017 and 2018 that were blamed on its dilapidated equipment and managerial negligence.

PG&E used bankruptcy to settle those claims by wildfire victims, insurers and government agencies for $25.5 billion. The company also worked out a separate deal with most of its bondholders to persuade them to abandon a alternative route out of bankruptcy that would have made it easier for the state to take over if things continued to go awry.

Things are already so bad that PG&E expects to have to impose deliberate blackouts in parts of its sprawling service territory for at least the next few years to reduce the chances its power lines will ignite more wildfires during dry, hot and windy conditions that are becoming a perennial event in Northern California amid climate change. With Johnson serving as CEO, P G&E was skewered for the way its turned off the power in October when as many as 2 million people were left in the dark, some of whom had to make do without electricity for several days.

Saying it was “rapidly evolving,” PG&E struck a note of contrition in the filings it made in connection with Friday’s announcement. “The company that emerges from bankruptcy will be a changed company with an enhanced focus on safety, improvement, customer welfare and operational excellence,“ PG&E said.

As it looks for new directors on its board, PG&E said it would rely on a “skills matrix” focused on an understanding of safety, climate change, renewable energy, technology, finances and community leadership. The company also intends to have a board consisting of mostly California residents, up from roughly one-third now, in another concession to Newsom.