A California energy supplier has reached a nearly $1.7 billion settlement with regulators for its role in causing devastating wildfires in 2017 and 2018 that killed more than 100 people in total.

Faulty Pacific Gas and Electric power lines were blamed for sparking last year’s Camp Fire in Northern California, the deadliest in the state’s modern history.

Under the draft deal published Tuesday, PG&E shareholders will foot the bill for wildfire-related costs, as well as forest fire-fighting measures and the upkeep of electrical equipment blamed for causing several fatal blazes.

It cannot pass the costs on to ratepayers.

PG&E filed for bankruptcy protection in January, saying it faced more than $30 billion in fire-related claims.

The firm is bidding to resolve its liabilities by a June government deadline, in order to gain access to a multibillion-dollar fund to compensate wildfire victims.

It also announced a $13.5 billion settlement with victims earlier this month over fires that destroyed thousands of homes.

But California Gov. Gavin Newsom, who must sign off on the plan to emerge from bankruptcy, rejected the victim settlement, calling it “woefully short” of the state’s requirements.

He called for sweeping organizational changes.

The state “remains focused on meeting the needs of Californians including fair treatment of victims,” and not on Wall Street financial interests funding an exit from bankruptcy, he wrote in a letter to PG&E CEO William Johnson.

Obsolete equipment, wooden power poles and uncleared land around high-voltage lines have been blamed for triggering the fires, and PG&E was accused of putting its profits ahead of safety.

The draft settlement must still pass through further reviews.