Neighbors of Duke Energy Corp.’s unlined coal ash pits in North Carolina went to court after the company said their $5,000 “goodwill” payments required them to give up future health claims linked to contaminated well water, but now they’re ending the lawsuit.

Lawyers representing hundreds of neighbors of the company’s coal plants dropped their lawsuit last week, and Charlotte-based Duke Energy posted an online clarification. It said that people taking their money couldn’t sue over health claims, but children who blame groundwater pollution for health problems would not be barred from suing.

“The families now have more power to hold Duke accountable for future harms and losses if they occur,” Amy Brown, a neighbor of the company’s Allen power plant in Belmont said, in a statement. She declined to say more about the deal during a telephone call, citing restrictions imposed with the settlement.

Her Salisbury attorney, Mona Lisa Wallace, said the conditions accompanying Duke Energy’s legal release have been changed in ways that satisfied the neighbors.

“As we talked with the residents, we were able to clarify misinformation and confusion about what is and is not included in the release they’d be asked to sign,” Duke Energy spokeswoman Paige Sheehan said in an email.

Neighbors taking the $5,000 “goodwill” payment now will agree that they release “Duke Energy and its affiliates from liability for any and all claims, including but not limited to any claims for personal injury or property damage, related to the presence of any constituents in my groundwater or well water at the property identified herein allegedly caused by Duke Energy’s coal combustion residual impoundments.”

Duke Energy says neighboring water wells haven’t been contaminated by chemicals from its coal ash pits. Coal ash — the remains after coal is burned for electricity — contains arsenic, lead, mercury and other heavy metals.

In 2015, state scientists warned more than 300 coal-ash neighbors that their well water contained risky levels of a cancer-causing chemical. Former Gov. Pat McCrory’s administration in 2016 reversed that advisory, saying the previous warning used a too-cautious health standard.

A state law requires the company to install by October either new municipal water lines or a household water treatment system to homes within a half mile of coal ash sites.

The $5,000 payment to neighbors agreeing to forego future litigation are separate from one-time payments described as covering about 25 years of water bills resulting from the new public water connections. Some lump-sum payments for water bills may be as high as $22,000, the company has said.

The utility, one of the country’s largest electricity companies, delivers electricity to about 7.4 million customers in the Carolinas, Indiana, Ohio, Kentucky and Florida.