(CNN) California utility giant Pacific Gas and Electric has agreed to pay $13.5 billion to individuals affected by several recent fires in the state, the company announced Friday night.

The agreement still has to be approved by a bankruptcy court. PG&E has filed for Chapter 11 bankruptcy, which allows for restructuring.

The claims stem from the 2015 Butte Fire, the 2017 Northern California fires, the 2018 Camp Fire, as well as the fire at Oakland's Ghost Ship warehouse in 2016.

"From the beginning of the Chapter 11 process, getting wildfire victims fairly compensated, especially the individuals, has been our primary goal," CEO and PG&E President Bill Johnson said. "We want to help our customers, our neighbors and our friends in those impacted areas recover and rebuild after these tragic wildfires."

Equipment linked to deadly fires

The company has been criticized for the role its equipment has played in the outbreak of numerous fires in California, among them the deadliest and most destructive wildfire in state history.

An investigation by the California Public Utilities Commission's Safety and Enforcement Division (SED) concluded that the company's equipment helped lead to last November's Camp Fire, which killed 85 people.

The report pointed specifically to inadequate maintenance and inspection of transmission line towers. PG&E conceded that a part separated from a transmission-line tower, likely starting the fire in dry vegetation near the town of Pulga. Inspections would have identified wear that would have warranted a close climbing inspection, the report said, but PG&E's records do not show a climbing inspection of that tower in at least 17 years.

"We remain deeply sorry about the role our equipment had in this tragedy, and we apologize to all those impacted by the devastating Camp Fire," the company said in a statement responding to the report. "PG&E's most important responsibility must always be public and employee safety, and we remain focused on helping affected communities recover and rebuild, resolving wildfire victims' claims fairly and expeditiously, and further reducing wildfire risks."

Recently, PG&E has tried to avoid causing fires by cutting power to its customers during particularly dry and windy periods.

Fires push company to bankruptcy

PG&E filed for bankruptcy in January to shed some of its debt and pay for damages and stay in business. The company cited at least $7 billion in claims from the Camp Fire.

If the utility does not pull itself out of bankruptcy, California Gov. Gavin Newsom said the state would take over.

"PG&E as we know it may or may not be able to figure this out. If they cannot, we are not going to sit around and be passive," Newsom said. "If Pacific Gas and Electric is unable to secure its own fate and future ... then the state will prepare itself as backup for a scenario where we do that job for them."

Newsom said that his office aims to get the company out of bankruptcy by June 30, 2020 by first working on a plan with PG&E and other stakeholders, but added that the company could not continue without making changes to its safety culture.