The state's aging natural gas pipelines are riddled with about 20,000 potentially dangerous and environmentally damaging leaks, many decades old, according to the first statewide analysis of the problem in Massachusetts.
Detailed maps of the leaks became available this week as a result of a new state law requiring utility companies to report the location and age of all their known gas leaks, which according to one estimate have cost ratepayers more than $1 billion.
"The leaks are potentially explosive, kill trees, harm human health, and release an extraordinarily destructive greenhouse gas," said Audrey Schulman, president of the Home Energy Efficiency Team, a Cambridge nonprofit that mapped the leak data submitted by the utilities. "To add insult to injury, we ratepayers have to pay for the lost gas."
The data show that Cohasset has more leaks per household that uses gas than any other municipality in Massachusetts, while Weymouth has more leaks than any other town when measured by the amount of streets.
Boston, which has 9 percent of the pipes in Massachusetts that are losing gas through ruptures, more than any other city or town, also has the oldest leaks in the state. One leak not far from Fenway Park has been seeping noxious emissions for 30 years, the data show.
Schulman said there may be even more leaks than the utilities are reporting. Last year, her organization tested for gas leaks in Somerville and found nearly 500 of them — almost three times the number reported by Eversource Energy and National Grid, the region's main gas suppliers, she said.
Officials at the utility companies said they're working as fast as possible to plug the leaks. The gas releases an odor similar to rotten eggs to make the leaks easy to detect.
The leaks are often the result of the corrosion of aging cast-iron pipes, some more than a century old, or construction accidents.
By law, the utilities are required to repair immediately leaks that pose a risk of explosion. A state law passed last year requires utilities to repair minor leaks on streets that are under construction, near a school zone, or around trees that appear to be dying.
The utilities used to allow those leaks to seep indefinitely, because they didn't see them as an imminent threat.
Caroline Pretyman, a spokeswoman for Eversource, said her company monitors all its leaks and has an accurate tally of them.
"There is a complex and rigorous system of gas leak surveys that are undertaken every year," she said.
In the coming years, Eversource plans to replace old pipes at a rate of 50 miles per year, with the goal of eliminating pipes prone to leaks within 25 years.
This year, the company expects to repair about 30 miles of 390 miles of cast-iron pipelines, Pretyman said.
Danielle Williamson, a spokeswoman for National Grid, said the company plans to spend $2.4 billion over the next five years to repair its pipes, with the goal of replacing all its leak-prone pipes in 20 years. Since 2010, the company has replaced more than 630 miles of pipes.
"National Grid's natural gas system is safe and operating normally," she said. "We take the safety of the public, our communities, and our employees very seriously."
Natural gas explosions, including one last year that injured about a dozen people in Dorchester, have raised safety concerns about the leaks.
But repairing them also yields economic and environmental benefits.
A federal study commissioned two years ago by Senator Edward Markey found that Massachusetts residents paid as much as $1.5 billion from 2000 to 2011 for gas they never used because of leaks.
Natural gas is mainly composed of methane, which traps heat and is about 25 times more powerful than carbon dioxide, meaning small amounts can have a significant impact on global warming.
In an effort to blunt the impact of methane, the Obama administration this week released a plan to cut emissions of the gas by nearly half nationwide over the next decade.
In January, a study by scientists at Harvard University found that methane has been leaking from pipes, storage facilities, and other sources in the Boston area by as much as three times greater than previously estimated. The leaked gas is enough to heat as many as 200,000 homes a year and is valued at $90 million a year, the authors said.
The maps that became available this week show Cohasset with 205 leaks, one for every six homes that use gas, including a leak that is 24 years old.
By comparison, that data reveal one leak for every 250 homes that use gas in Easton, a town with a similar percentage of gas-heated homes.
"Wow," said Christopher G. Senior, town manager of Cohasset, upon learning that his South Shore community of 8,000 residents has such a large number of leaks. "It's very surprising. We've had no explosions or fires."
He said National Grid next month will replace nearly 2,000 feet of steel gas mains that were built in 1928.
"It's going to be important for National Grid to explain this to us," Senior said.
In nearby Weymouth, the maps show 657 leaks, nearly three leaks for every mile of road, compared with one leak for every five miles in Peabody, which has a similar percentage of gas-heated homes.
"This is definitely concerning," said Mayor Susan Kay of Weymouth, which has 50,000 residents.
In Boston, where the data show 1,853 leaks, officials said they now hold monthly meetings with National Grid to review repairs.
They praised the new law for providing a more detailed portrait of the problem in Boston.
"At least we now have an understanding of the extent of the leaks," said Austin Blackmon, the city's environmental chief. "Now the city can react to it."