SAN BRUNO, Calif. – First, the pipeline exploded. Then the flames, like a blowtorch, set the neighborhood overlooking San Francisco Bay ablaze.

Flaming chunks of asphalt hurled into the air from the blast blew through the roof at Bill Magoolaghan’s house. As he watched from a nearby hillside in San Bruno, one question came to his mind: Why can’t someone stop the tower of fire?

“The gas flames were still shooting 300 feet into the air,” he recalled thinking, 40 minutes after the Sept. 9 explosion.

One reason is that the line was not equipped with remotely operated or automatic shut-off valves that would have halted the gas within minutes of the accident — devices that federal safety officials have recommended to industry and regulators for decades.

An Associated Press investigation found that the utility, Pacific Gas & Electric Co., agreed as far back as 1997 that remotely operated valves did a better job of protecting public safety than manual ones. But it opted against using them widely across its network of high-pressure transmission lines, saying they weren’t necessary or required.

When the flames were finally halted 89 minutes after the explosion, residents were left to survey the damage: eight dead, dozens injured and 55 homes left uninhabitable. The explosion also focused attention on the condition of the nation’s pipelines — some aging and many, like San Bruno, running beneath towns and cities.

The accident, the AP found, also highlights a troubling pattern: A pipeline explodes. Federal investigators call for safety improvements. The government leaves it largely to industry to make safety decisions.

The result is that safety measures are adopted sporadically, sometimes decades later — if at all.

Now, as federal investigators prepare for a March hearing on the explosion — the first on a pipeline accident in a decade — lawmakers are pressing for sweeping reforms to a patchwork system of safety regulations.

“It’s after an accident that we find there were shortcomings,” said Deborah Hersman, head of the National Transportation Safety Board, which investigates pipeline accidents. “Unfortunately, we’ve had to learn that lesson too many times.”

The industry and regulators from the U.S. Department of Transportation, which oversees the nation’s 2.5 million-mile network of gas and liquid pipelines, say they have made vast improvements in recent decades, noting the number of fatal accidents has dropped as the network expanded dramatically.

Christina Sames, vice president of operations and engineering at the American Gas Association, said she can “count on one hand” incidents of the magnitude of San Bruno in the past 20 years. “Those are definitely outliers,” she said.

While the NTSB is in charge of investigating such accidents, regulators or industry do not have to adopt its recommendations.

An AP analysis of accidents dating to 1969, when the NTSB began investigating pipeline accidents, shows that the agency has made similar recommendations time and again, including on utilities’ failures to draft appropriate emergency plans, mark pipeline locations or adequately inspect risky stretches of pipe.

The NTSB is looking at the same issues in San Bruno, but pipeline safety advocates say the case of the shut-off valves provides the clearest example of how a weak regulatory system can jeopardize public safety.

Since 1969, the NTSB has called for the more sophisticated valves on natural gas or hazardous-liquid pipelines eight times. The first followed a 1970 propane pipeline explosion that injured 10 people in Franklin County, Mo. The NTSB said a fire that raged for an hour and 40 minutes after the initial blast “would have burned out much sooner” if there were valves.

In response, the Transportation Department proposed requiring remotely operated valves on some types of lines. The proposal, however, was later withdrawn. Agency officials concluded in 1981 that such valves were “not an effective means to reduce the accident effects” following a pipeline rupture, saying most damage in pipeline failures comes from the initial blast.

In 1994, a gas explosion in densely populated Edison, N.J., sent a 400-foot-high column of flames into the sky. It took more than two hours to shut the manual valves on the spewing 36-inch pipeline. The blast caused $25 million in property damage and two serious injuries.

The NTSB renewed its push for more remotely operated valves. Transportation officials agreed to a study, but citing industry suggestions, left out the cost of potential damages or lives lost. Instead, the agency factored in the cost of lost fuel when pipelines break. The officials ultimately declined to require the valves, saying that they were not cost-effective.

During the past 60 years, PG&E has put in more than 60 remotely controlled valves on transmission pipelines located near earthquake fault lines or in areas that are vulnerable to external damage or critical to operations, spokesman Joe Molica said.

About a mile from the accident site, the San Bruno line runs within 300 feet of an area believed to have an earthquake fault line. But Molica said the utility’s preference had been to make the pipes themselves more resistant to earthquakes rather than installing valves to shut them down quickly if an accident occurs.

That leaves most of the company’s 6,700 miles of transmission lines without the valves. Molica said cost wasn’t a factor, yet cost was cited by the company when it was lobbying against the valves in the late 1990s.

Last fall, after the explosion, PG&E announced it would install more remotely operated and automatic valves in highly populated zones — urban areas with at least 50,000 people and at least 1,000 people per square mile.

Coroners’ reports obtained by the AP indicate at least five of the eight dead in San Bruno were trying to flee when they died.

Evidence released to date leaves it unclear if the deaths of any of the five could have been avoided if different valves were in place. But experts said it was possible — and that others who were injured and homes that were leveled might have been spared.

If valves on the line had closed immediately after the initial explosion, the gas-fed fire likely would have gone out in under 10 minutes, said Theo Theofanous, a chemical engineer at the University of California, Santa Barbara who directs its Center for Risk Studies and Safety.

“This just begs the question as to why they didn’t put in more shut-off valves, especially in such a populated area,” said Theofanous, who analyzed the accident for the AP and served on a 2004 National Academy of Engineering pipeline safety committee.

The head of the federal Pipeline and Hazardous Material Safety Administration, Cynthia Quarterman, told the AP that her staff was reviewing whether too much leeway has been given to companies to determine how and where to initiate safety upgrades.

Also, new rules are in the works to expand requirements for shut-off valves — both for pipelines serving homeowners and also larger lines that carry hazardous liquids such as oil or propane, Quarterman said.

A review of those proposals show they would leave out natural gas transmission lines like the one in San Bruno.

Residents returning to the blast site — now a blackened gash carved into the suburban neighborhood of 1960s-era homes — say they are eager for federal authorities to determine what went wrong.

Robert Pellegrini, who lost his home of 35 years, said he wished he could believe that the NTSB’s final recommendations would change policy. But first, “I just wanted the truth about why this happened,” he said.