(Reuters) - California's bankrupt power producer PG&E Corp PCG.N said on Friday it had reached a $13.5 billion settlement with victims of some of most devastating wildfires in the state's modern history.

Slideshow ( 2 images )

The agreement helps smooth the way for the beleaguered company to emerge from bankruptcy. It filed for Chapter 11 protection in January, citing potential liabilities in excess of $30 billion from wildfires in 2017 and 2018 linked to its equipment.

“With this important milestone now accomplished, we are focused on emerging from Chapter 11 as the utility of the future that our customers and communities expect and deserve,” Chief Executive Officer Bill Johnson said in a statement.

State fire investigators in May determined that PG&E transmission lines caused the deadliest and most destructive wildfire on record in California, the wind-driven Camp Fire that killed 85 people in and around the town of Paradise last year.

They likewise concluded that PG&E power lines had sparked a separate flurry of wildfires that swept California’s wine country north of San Francisco Bay in 2017.

The agreed settlement is subject to a number of conditions and requires confirmation by the United States Bankruptcy Court, the company said.

It faces a tight deadline as it needs to exit bankruptcy by June 30, 2020 to participate in a state-backed wildfire fund that would help reduce the threat to utilities from wildfires.

“We share the state’s focus on helping mitigate the risk of future wildfires and we will continue to do everything we can to help reduce those risks across our system,” Johnson said in the statement.

PG&E had previously reached a $1 billion settlement with cities, counties and other public entities and an $11 billion agreement with insurance carriers related to the wildfires.

It has come under renewed criticism this year for precautionary power outages to guard against the risk of wildfires posed by extremely dry and windy weather.

Governor Gavin Newsom, state regulators and consumer activists have lambasted the actions as being too broad, with Newsom blaming PG&E for doing too little to properly maintain and secure its power lines against wind damage.

Utility executives have acknowledged room for improvement while defending the sprawling cutoffs as a matter of public safety.