MADISON, Wis. (AP) — A judge has restored Wisconsin’s authority to protect water quality after ruling it was improperly given up in a settlement with a dairy industry group.

The Wisconsin State Journal reports that a Milwaukee County judge ruled last week to restore the Wisconsin Department of Natural Resources’ authority to enforce water quality standards by requiring big dairy farms to not leak pollutants into public waters.

The agency had been pushing for improvements to feed storage and areas where calves are housed, but ended such efforts in a 2017 settlement with the Wisconsin Dairy Business Association.

Rain carrying nutrients and pollutants from soil, manure and animal feed into lakes and streams poses health hazards.

A DNR spokesman declined to comment.

An attorney representing conservation groups says it’s a victory for clean water and transparency.