U.S. officials adopted a rule Thursday aimed at reducing deaths and environmental damage from oil and gas pipeline ruptures.

The rule requires companies to install emergency valves that can quickly shut off the flow of oil, natural gas or other hazardous fuels when pipelines rupture.

It came in response to a massive gas explosion in San Bruno, California that killed eight people in 2010, and to multiple large oil spills.

The cut off valves have been recommended since the 90's, but pipeline companies resisted because of the expense of installing them and concerns they could close accidentally and shut off fuel supplies.

Still, Transportation officials say they were needed because too many people have been harmed by pipeline failures, though some safety advocates question how effective the valves will be. That’s because it applies only to new pipelines.