Pacific Gas & Electric has agreed to pay more than $13 billion to the California families affected by wildfires and other blazes started by the company’s power lines in 2017 and 2018, the company said.

The utility company announced the settlement in a statement on Friday night, saying payment will be for families who lost property and whose relatives died in the 2018 Camp Fire, the 2017 Northern California Wildfires, the 2017 Tubbs Fire and the 2015 Butte Fire.

The settlement, a total of $13.5 billion, also covers those affected by the 2016 Ghost Ship Fire in Oakland, who claimed in lawsuits that PG&E failed properly monitor, inspect and repair electrical equipment that provided power to the warehouse, where 36 people perished.

The company filed for bankruptcy protection in January after survivors affected by the fires hit them with more than $30 billion in claims. The settlement announced Friday will need approval by the US bankruptcy court.

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

If the settlement is approved, PG&E will likely emerge from bankruptcy ahead of a June deadline to gain entry into California’s “go-forward wildfire fund,” the company said.

That fund will provide protections for investor-funded utility companies from shouldering the cost of claims made after a wildfire in the state.