MINNEAPOLIS (AP) — 3M Co. has agreed to pay the state of Minnesota $850 million to settle a major case alleging the manufacturer damaged natural resources and contaminated groundwater by disposing of chemicals over decades, attorneys announced Tuesday.

The state was seeking $5 billion from Maplewood, Minn.-based 3M in a case that focused on the company’s disposal of chemicals once used to make Scotchgard fabric protector and other products.

The lawsuit, filed in 2010, alleged 3M damaged Minnesota’s natural resources, including more than 100 miles of the Mississippi River, and contaminated drinking water, harmed wildlife and posed a threat to human health.

The company denies it did anything wrong, insisting it was acting legally at the time.

Attorney General Lori Swanson said the settlement money will go toward projects to clean up and safeguard drinking water in the eastern suburbs of St. Paul.