Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

PG&E has agreed to plead guilty to 84 counts of involuntary manslaughter and one felony count of unlawfully causing a fire after it was blamed for the Camp Fire in Northern California, the deadliest in state history.

The fire, which burned through the Sierra Nevada foothills for half a month in late 2018, burning through three towns, was sparked by Pacific Gas and Electric Co. equipment, according to the California Department of Forestry and Fire Protection, which identified ignition points in Butte County.

The settlement, which the utility reached with the Butte County district attorney's office on March 17, was filed in state Superior Court in the county and made public Monday morning by the U.S. Securities and Exchange Commission.

It must still be approved by Butte County Superior Court, as well as the federal bankruptcy court overseeing PG&E's case. In January 2019, PG&E filed for Chapter 11 protection to, in part, set up a "Fire Victim Trust."

The company was expected to plead guilty in court this Friday, but because of the coronavirus pandemic, courts are closed, and a date of April 24 has been set for the guilty pleas and sentencing, according to a statement released by Butte County District Attorney Mike Ramsey.

The fire reduced the towns of Paradise and Magalia and parts of Concow to ash.

Download the NBC News app for breaking news and politics

The Butte County sheriff-coroner initially said 85 people were killed, but further investigation "cast doubt" that one of the deaths resulted directly from the Camp Fire, Ramsey's statement said. The Wall Street Journal reported that the grand jury that returned the indictment found that one of the victims had died by suicide.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The count of unlawfully causing a fire "includes three special allegations for PG&E's causing great bodily injury to a firefighter; causing great bodily injury to more than one surviving victim; and causing multiple structures to burn," Ramsey said.

PG&E also plunged millions of Californians into darkness for days at a time last fall as it shut off power to prevent its transmission lines and other outdated equipment from sparking more fires. The San Francisco-based utility is one of the largest combined natural gas and electric energy companies in the U.S.

A PG&E spokesman told NBC News that the utility has reached settlements with victims from 2015, 2017 and 2018 wildfires, amounting to about $25.5 billion. The staggering total allots $13.5 billion for private claims, $11 billion for insurance companies' claims and $1 billion for government entity claims, according to the Butte County district attorney's office.

The Camp Fire burned more than 153,000 acres and destroyed almost 19,000 structures, while 2017's Redwood Fire in Mendocino County also caused a great deal of destruction and killed nine people.

The district attorney's office determined that ongoing criminal prosecution of PG&E could "jeopardize the company's ability to pay victims," according to the settlement. The utility cited more than $30 billion in potential uninsured liabilities as part of its bankruptcy claim.

Ramsey's staff spent the weekend notifying the next of kin of deceased victims that a settlement would be disclosed Monday so "they would not be surprised," the district attorney's office statement said.

PG&E and California Gov. Gavin Newsom announced a deal Friday in which PG&E agreed to completely restructure its board and operations and to put the company up for sale, which would essentially allow the state to take over if it can't get out of bankruptcy by June 30.

It also agreed to regulatory oversight and committed billions of dollars in additional spending to prevent wildfires, The Associated Press reported. The plan gained the approval of Newsom, who had rejected two previous versions. PG&E needs the state's cooperation to qualify for coverage from a $21 billion wildfire insurance fund that California created last summer.

"We are working diligently to get our Plan of Reorganization approved by the Bankruptcy Court as soon as possible, so that we can get victims paid," PG&E CEO and President Bill Johnson said. "We will emerge from Chapter 11 as a different company prepared to serve California for the long term."

As part of the plea agreement, PG&E must pay the maximum allowed fine of nearly $3.5 million on top of $500,000 to the Butte County District Attorney Environmental and Consumer Protection Trust Fund to cover costs related to the investigation.

"Other agreements with the company included having a federally-appointed court monitor of PG&E's safety performance report to the Butte County District Attorney for the next two years," Ramsey's office said.

PG&E also agreed to fund efforts to help residents gain access to water for the next five years because the fire destroyed the Miocene Canal, the utility said in a statement.

"Thousands lost their homes and businesses," Johnson said. "We cannot change the devastation or ever forget the loss of life that occurred ... but our hope is that this plea agreement, along with our rebuilding efforts, will help the community move forward from this tragic incident."

"Our equipment started the fire," he added. "Those are the facts, and with this plea agreement we accept responsibility for our role in the fire."