LOS ANGELES — California regulators adopted a stricter rule Thursday that requires utilities to plug leaks in natural gas lines.

The rule adopted by California Public Utilities Commission aims to cut 40 percent of the potent greenhouse gases emitted from leaking pipes and gas distribution systems by 2030.

The rule is the most comprehensive in the nation and will curb the amount of gas used by 72,000 homes a year and save $8 million in lost gas, said Tim O’Connor of the Environmental Defense Fund.

“It is another example of how states are stepping up even as the federal government pulls back on important environmental protections,” O’Connor said. “When combined with action the state took earlier this year to reduce pollution from oil and gas wells, the rule makes it clear California is not going to turn a blind eye to the climate impacts of gas leaks.”

Prior to the rule taking effect, utilities were not required to repair tens of thousands of leaks that weren’t considered a threat to public health but cause climate pollution, O’Connor said.

An analysis of the legislation that spurred the changes noted that in 2013 Pacific Gas and Electric Co. reported more than 27,100 nonhazardous leaks.

Some leaks persisted more than 20 years and there wasn’t incentive to fix them because utilities got paid for gas they lost, O’Connor said.

The amount of gas released from leaks annually is similar to the amount that spewed into the environment after a massive Southern California Gas Go. blowout that lasted nearly four months before it was capped last year. That leak was considered the largest known release of methane in U.S. history.

A spokesman for SoCalGas said the utility is committed to fixing and preventing leaks and the legislation that prompted the rule allows it to invest in its system. A PG&E spokesman didn’t return a message seeking comment.

Utilities can recoup repair costs from ratepayers.

Utilities will now be required to report all leaks publicly and display leak maps by ZIP code.

The rule is similar to a measure adopted by California air regulators to reduce methane leaks from oil and gas extraction.