Pacific Gas & Electric on Friday announced it had reached a multibillion-dollar settlement with victims of wildfires that killed dozens of people and destroyed tens of thousands of homes across Northern California.

The settlement, valued at roughly $13.5 billion, will cover claims stemming from some of the deadliest and most destructive fires in the state’s history, including the 2018 Camp Fire and the 2017 Tubbs Fire. A federal bankruptcy judge needs to approve the accord before it becomes final.

“We are pleased that PG&E has finally admitted that the victims’ losses exceed $13.5 billion, and that PG&E is responsible,” said Robert Julian, a lawyer from the firm BakerHostetler in San Francisco representing victims.

The massive settlement could compensate tens of thousands of victims who have had to recover and rebuild after losing homes, businesses and loved ones in the blazes. It would also mark a step forward in the beleaguered utility’s attempts to emerge from bankruptcy in the coming months.

“There have been many calls for PG&E to change in recent years,” PG&E President Bill Johnson said in a statement Friday. “PG&E’s leadership team has heard those calls for change and we realize we need to do even more to be a different company now and in the future.”

In addition to the Camp and Tubbs fires, the settlement would cover claims related to the 2015 Butte Fire and the 2016 Ghost Ship Fire, an electrical fire that killed 36 people at a party in an artist warehouse in Oakland.

PG&E has faced waves of criticism over its response to the string of wildfires that have ravaged the state in recent years. After fire investigators determined the utility’s equipment was involved in some of the blazes, PG&E started preemptively cutting power to millions of customers during intensely dry, windy weather, infuriating residents and leading politicians to propose a public takeover of the company.

Fire officials determined earlier this year that PG&E’s equipment caused the Camp Fire, which killed 86 people, torched more than 150,000 acres and reduced almost all the housing in Paradise, Calif., to rubble. The utility agreed with the conclusion.

Investigators cleared the company of blame in the Tubbs Fire, which killed 22 people after burning through 37,000 acres around the city of Santa Rosa. But a lawsuit by victims of that fire alleged that PG&E equipment did cause the blaze, and the case was set to go to trial in January. The settlement may put the litigation to rest.

PG&E equipment may have also played a role in fires that ripped through California wine country in October and November. PG&E officials told regulators that electrical equipment broke near the ignition point of the 75,000-acre Kincade Fire in Sonoma County and two smaller fires — an admission that helped fuel doubts about the company’s controversial plan to stave off new blazes by conducting intentional blackouts.

The agreement Friday to compensate fire victims is the third major settlement PG&E has reached after filing for bankruptcy protection at the beginning of the year. In separate negotiations, the company agreed to a $1 billion settlement with cities and counties damaged by fires and an $11 billion settlement with insurers.

PG&E said the latest deal would put it on a path to emerge from bankruptcy by June 30, the deadline to participate in a fund created by the state legislature that California utilities will use to pay for future wildfires linked to their equipment.

“We recognize we need to deliver safe and reliable energy service every single day — and we’re determined to do just that,” said Johnson, the company president.

Even if the settlement is approved, however, PG&E will still have to reconcile with a frustrated and distrustful public and government officials who want to rein the company in.

Last month, a group of more than two-dozen local officials, led by San Jose Mayor Sam Liccardo, sent a letter to the state utility commission calling for PG&E to be replaced by a customer-owned cooperative. The officials who signed the letter represent some 5 million Californians.

Gov. Gavin Newsom — who has received hundreds of thousands of dollars in campaign contributions from PG&E and its employees — has also suggested that the state step in to restructure the utility. “PG&E, as we know it, cannot persist and continue,” Newsom said in a November news conference. “Everybody objectively acknowledges and agrees with that. It has to be completely transformed.”