A Los Angeles Superior Court judge has approved a settlement for Southern California Gas Co. (SoCalGas) to pay $119.5 million for the adverse consequences of the nation’s largest-ever methane leak at the Aliso Canyon natural gas underground storage facility.

The agreement, approved Monday by the state attorney general, Los Angeles city and county attorneys, and the California Air Resources Board, requires the Sempra Energy utility to pay fines, reimburse local first-responders, develop greenhouse gas (GHG) emission mitigation measures and complete public health and safety research.

Last summer SoCalGas agreed to a proposed settlement to resolve complaints regarding the 2015-16 four-month-long leak, which required thousands of nearby residents to evacuate. The state’s largest gas storage facility has been rarely used since it reopened.

Judge Carolyn Kuhl signed a consent decree, which has been criticized by environmentalists who were not satisfied with the settlement’s terms.

An allocation of the SoCalGas funds, which may not be derived from utility ratepayers, will include about 20% for mitigation measures to reduce GHG emissions by the equivalent of the 109,000 metric tons of methane that were estimated to have been released after the storage well blowout. In addition, $25 million will be used to study long-term health consequences, reimburse local governments for responding to the incident and to monitor chemicals in the air near the facility for eight years.

Mitigation programs are to include projects that capture methane from lagoons of cow manure to supplement the gas supplies and to fuel trucks that run on compressed renewable natural gas.

Aside from the settlement, SoCalGas reportedly has spent more than $1 billion related to the blowout with most of the funds for temporarily relocating 8,000 families, according to utility filings with the U.S. Securities and Exchange Commission. The utility still faces more than 385 lawsuits on behalf of 48,000 people.

SoCalGas spokesperson Melissa Bailey said Tuesday the utility has made “comprehensive safety enhancements” at the Aliso facility, agreed to continue its fence line methane monitoring program and to hire an independent ombudsman to monitor and report on safety at the facility.

“The settlement will also help California meet its ambitious climate goals by advancing projects that capture methane from dairy farms and waste and convert that energy into renewable natural gas for use in transportation,” Bailey said.

Under the state’s updated operational rules, the 3,200-acre facility last summer gained regulatory approval to resume limited injections. The regulations allow gas to flow only through newly installed and pressure-tested inner steel tubing.