MORGANTOWN, W.Va. (AP) â¿¿ Hundreds of Boone County residents who blame coal companies for contaminating their water supplies settled their last remaining lawsuit with Massey Energy and four subsidiaries just as a trial was set to begin Tuesday.

Both Massey's new owner, Virginia-based Alpha Natural Resources Inc., and a court official confirmed that Circuit Judge William Thompson halted the proceedings in Madison so language in the settlement could be finalized.

Alpha spokesman Ted Pile said the terms are confidential and didn't comment further.

The parties had tried to negotiate a settlement last month but were unable to make a deal. When asked what had changed, plaintiffs' attorney Roger Decanio responded, "possibly the fact that we were there to pick a jury."

Decanio said he, too, is prohibited from sharing the details of the settlement.

"There's an old saying in this field that if both parties walk out and neither is happy nor completely sad, then it's a good deal," he said. "I think that's probably the best description."

Thompson had consolidated 155 medical monitoring lawsuits involving about 350 people from Seth and Prenter. The plaintiffs have long argued that mining activities, including the underground injection of coal slurry, are to blame for discolored, foul-smelling well water and health problems.

Slurry is the wastewater created when coal is washed to help it burn more cleanly, and mining companies have long disposed of it in Appalachia by pumping it into worked-out underground mines.

The lawsuit argued that decades of surface and underground mining activities fractured the geologic strata that had contained the slurry, and a network of cracks created a pathway for the slurry to contaminate the aquifer.

An environmental consultant hired by the plaintiffs said "a very toxic and pungent" hydrogen sulfide gas was evident in every home, while every water sample had apparent odor and discoloration. He said testing revealed varying levels of arsenic, lead, iron, manganese and sulfides.

Several other coal companies that were initially sued have long since agreed to confidential settlements but denied any responsibility for the problems.

The plaintiffs are now served by public water lines and no longer rely on their wells for consumption, but they were demanding periodic screening for diseases they believe they could contract because of long-term exposure to toxic substances.

In January, the state Department of Environmental Protection released the findings of a yearlong groundwater study that found no evidence linking mining to widespread pollution in the area.

Triad Engineering, the DEP's consultant, sampled 33 wells and found evidence of possible links to mining activities in only two of them, neither of which is used as a drinking water supply.

But Decanio has challenged Triad's approach and methodology, arguing there were too few samples to be representative.

Copyright 2011 Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.