(Reuters) - Pacific Gas & Electric has agreed to plead guilty to 84 involuntary manslaughter counts in connection with the 2018 Camp Fire, the most destructive wildfire in California’s history.

The plea by California’s largest utility was announced on Monday by its parent PG&E Corp, three days after the utility accepted tighter oversight and pledged billions of dollars to improve safety and help wildfire victims, under an agreement California Governor Gavin Newsom.

That agreement ended a major roadblock to PG&E’s planned emergence from Chapter 11 bankruptcy, as Newsom devotes his attention to the coronavirus outbreak in his state.

Pacific Gas & Electric said it entered its plea through a March 17 agreement with the Butte County District Attorney’s office, which would end all state criminal proceedings against the San Francisco-based company related to the Camp Fire.

The fire began on Nov. 8, 2018, and destroyed much of the town of Paradise, which had about 26,000 people, and nearby Concow. More than 18,000 buildings were destroyed. PG&E also pleaded guilty to one count of unlawfully starting a fire.

“We cannot replace all that the fire destroyed, but our hope is that this plea agreement, along with our rebuilding efforts, will help the community move forward from this tragic incident,” PG&E Chief Executive Bill Johnson said in a statement.

Under the agreement, PG&E would pay a maximum $3.5 million fine plus $500,000 in costs, and up to $15 million to provide water to residents after the fire destroyed the utility’s Miocene Canal.

Some fire victims would receive payouts under PG&E’s proposed bankruptcy reorganization plan, which was submitted on March 16, PG&E said.

The settlement requires approval by the Butte County Superior Court, and by the federal bankruptcy court overseeing PG&E’s Chapter 11 case.

PG&E and its utility unit filed for bankruptcy in January 2019, citing more than $30 billion in potential liabilities from California wildfires in 2017 and 2018 linked to its equipment.

The company previously reached $25.5 billion of settlements related to wildfires in 2015, 2017 and 2018, including $13.5 billion for victims and $12 billion for insurers, cities, counties and other public entities.

Under the settlement with Newsom, PG&E agreed to pay no shareholder dividends for three years, saving about $4 billion, and pursue a “rate-neutral” $7.5 billion financing package that would benefit ratepayers.

PG&E also agreed to put itself up for sale if it cannot emerge from Chapter 11 by a state-imposed June 30 deadline, before the next wildfire season begins.