Southern California Gas Co. says it reached a nearly $120 million settlement over a blowout at a natural gas storage field that became one of the nation’s largest known releases of methane. The October 2015 accident forced thousands to flee their Los Angeles homes.

The settlement with state and local governments aims to mitigate the greenhouse gases that vented from the Aliso Canyon well for nearly four months.

Under terms of the 110-page settlement agreement, the utility will pay up to $25 million to study long-term health consequences; reimburse city, county, and state governments for responding to the blowout; monitor chemicals in the air along the boundary of the facility for eight years; and not pass costs of the settlement to ratepayers. (Read the settlement agreement.)

California Attorney General Xavier Becerra says the tentative deal, which requires court approval, addresses violations of health and safety codes, the discharge of air contaminants and the failure to report the release of hazardous materials.

In a previous settlement of criminal charges, SoCalGas agreed to a $4 million settlement with Los Angeles prosecutors after pleading no contest to a single misdemeanor of failing to notify state authorities about the blowout soon enough.

The company is a unit of Sempra Energy, and says it has spent over $1 billion because of the blowout. Much of the money was spent temporarily relocating people and reimbursing them for meals and other costs and cleaning homes.

Aliso Canyon is one of the largest natural gas storage facilities in the U.S. west. Gas was piped into an empty oil field more than a mile underground through repurposed aging oil wells, some more than 50 years old.

A 2017 study said that more than 1 in 5 active U.S. underground natural gas storage wells could be at risk of leaks due to obsolete well designs. The study, from the Harvard T.H. Chan School of Public Health, said that the obsolete wells operate in 19 states across 160 facilities that encompass more than half of the total working gas capacity in the U.S. The oldest wells are in Ohio, Pennsylvania, New York and West Virginia.

The research team says the potentially vulnerable wells are likely to be similar in design to the well that failed and led to the nearly four-month-long Aliso Canyon gas leak.

After the leak was capped, Southern California Gas had to meet much stricter regulations to store gas in the field, which required overhauling wells, incorporating new equipment to monitor for leaks and capping wells that didn’t pass regulations. The incident led to stricter rules for other facilities statewide. Limited operations resumed in July 2017.