BROCKTON, Mass. (AP) — When Frederick Law Olmsted designed this city's largest park in the 1930s, his centerpiece was a chain of small lakes and ponds.

One of those, Ellis Brett Pond, was for years a popular swimming hole. Photographs from the 1950s show hundreds of people, adults and children alike, lining a sandy beach on summer days and playing in knee-deep water.

The pond's glory days as a community gathering spot are long past. What remains is a shallow lake wrapped around woods and wetlands. But in big storms, it can fill up quickly, and that's what concerns officials in the city of 95,000.

The dam holding back Ellis Brett Pond is nearly a century old, and Brockton officials worry about its ability to hold up in the years ahead.

The pond's spillway has been determined to be inadequate for a historic storm. City officials also want to widen the back of the dam to meet state regulations and install an automatic gate that would allow city workers to steadily release water from the pond remotely to ensure the spillway does not get overloaded.

Without these upgrades, there is a risk the dam will fail and inundate hundreds of homes and business downstream. In the water's path would be a public housing development, city offices and a church.

"The trend is toward more significant weather events and, for public safety, having a dam that is able to meet the possibility of larger events makes 100 percent sense," Parks Superintendent Tim Carpenter said.

He estimates the desired repairs would cost about $2 million, money the city has not secured.

The dam was among those highlighted in a two-year investigation by The Associated Press. The AP identified at least 1,680 dams nationwide that are rated as high-hazard because of the potential for loss of life if they failed and are considered to be in poor or unsatisfactory condition.

Emergency plans obtained by the AP indicate that thousands of people living and working downstream could be at risk if those dams were to catastrophically fail, while separate inspection reports cite a variety of problems. Those include leaks that can indicate a dam is failing internally, unrepaired erosion, holes from burrowing animals and extensive tree growth, which can destabilize earthen dams. In some cases, inspectors also flagged spillways that are too small to handle the amount of water that could result from increasingly intense rainstorms due to a changing climate.

The AP's investigation covers the U.S. territory of Puerto Rico but excludes five states that did not fully comply with records requests.

In Massachusetts, the AP found 39 high hazard dams that are in poor or unsatisfactory condition. Fourteen of those were on a list of 100 that a 2011 state audit determined were in poor and unsafe condition.

The number identified by the AP could have changed over the last year, if any of the potentially problematic dams were recently repaired.

Many of the deteriorating dams are decades old, and in some cases date back more than a century. Most were built to provide water and power to textile mills and other manufacturing sites. Today, most structures that hold back ponds and lakes are for recreation, flood control and drinking water.

A review of dam inspection reports in Massachusetts found similar problems to those plaguing structures nationwide.

Many of the poorly maintained dams are in densely populated areas, meaning a failure would inundate entire neighborhoods, shopping districts, highways and rail lines.

Massachusetts first took a hard look at its more than 300 high hazard dams 14 years ago, after the near-breach of one in Taunton forced the evacuation of 2,000 people and caused more than $1.5 million in economic losses.

Then-Gov. Mitt Romney ordered inspections of high hazard dams that were in unsafe, poor or fair condition. Before then, at least 30 of those dams hadn't been inspected in seven years. A subsequent state Senate report concluded the state had been slow to inspect dams and was not spending enough on dam safety.

Six years later, the state audit said 100 municipally owned dams required $60 million in repairs. The audit also called for every high hazard dam to have emergency action plans.

The state responded by bolstering the dam safety law and increasing spending to more than $2 million for the 2015 fiscal year. But spending has since dropped, to about $1.2 million in the 2019 fiscal year.

It has made progress on emergency action plans, with the AP finding that all 39 dams had plans. Only three had outdated inspections.

"Dam oversight is a constant struggle against nature and time," said Sen. Marc Pacheco, a Democrat whose district includes Taunton and who helped write the law that created a more efficient system for identifying and repairing aging dams in the state.

"The state's overall approach to dam regulation has improved substantially since that time, but we must remain vigilant in our efforts to ensure proper maintenance and prompt repair."

The Department of Conservation and Recreation declined an interview request about its dam safety program. But in a statement, the department said it has spent more than $54 million since 2006 to help pay for the design, reconstruction or removal of dams owned by private landowners, cities and other entities. The state Division of Ecological Restoration has spent another $4.8 million since the 2010 fiscal year to remove or repair old dams.

Still, many of the dams identified by the AP remain in bad shape, in some cases because the owner lacks the money to make repairs.

Some high hazard dams, such as Patch Pond Dam in Worchester, are among the 150 dams across the state where an owner cannot be found.

Others are owned by cash-strapped local governments that must balance the need for public safety with concerns over raising taxes for infrastructure repairs.

In Attleboro, the Manchester Pond Reservoir East Dike Embankment 3 and 4 and Manchester Pond Reservoir South Dike have long been a concern. Severe erosion and depressions have been found on the structures, which were included in the 2011 state audit.

Should the dams fail, several communities along the Massachusetts-Rhode Island border could be flooded, including Seekonk, Pawtucket, Providence and East Providence.

The city of Worcester must maintain 29 dams, including one considered unsafe and five rated in poor condition. Among them is Quinsigamond Pond Dam, which inspectors determined had foundational problems, including an inadequate primary spillway that was 70 percent blocked by sediment and vegetation.

If the dam failed, an emergency action plan found it would flood industrial and commercial properties downstream, state and city office buildings, and parts of the Massachusetts Turnpike.

Matt Labovites, the city's assistant commissioner for operations in the Department of Public Works & Parks, acknowledged the entire spillway of Quinsigamond must be rebuilt. But he said there was no imminent danger to residents downstream and that city officials must weigh spending on the dam against other priorities.

"There is not a limitless pot of money," he said.