ALBANY, N.Y. (AP) The state Department of Environmental Conservation announced Wednesday that it has reached an agreement with New York City to reduce muddy discharges from the city's upstate water supply system into a major trout stream and to invest about $3.4 million in environmental improvement projects in its Catskills watershed.

The issue has been a contentious one for years in Catskill Mountain towns along the lower Esopus Creek, and the Riverkeeper environmental group has filed lawsuits over it. The agreement comes after the Ulster County Legislature voted Tuesday to take legal action against the DEC to force it to resolve the dispute.

Riverkeeper attorney Kate Hudson said Wednesday she hadn't yet seen the consent order outlining the agreement so couldn't say if it was a satisfactory resolution. She said if the order continues to allow releases into the lower Esopus, it would be a violation of state and federal law.

The Environmental Protection Agency designated the lower Esopus Creek, which empties into the Hudson River, an "impaired water body" under the Clean Water Act because of New York City's discharges from its reservoirs. After prolonged periods of heavy rain, the city shunts muddy water into the Esopus so it doesn't get into the city's water supply.

DEC said the agreement requires the city to reduce the duration of muddy releases into the creek and to flush the creek with clear water more often than previously required. Failure to comply will result in a fine.

The agreement also calls for stream restoration projects in the lower Esopus Creek watershed, installation of new stream gauges and fish stocking. In addition, it throws in $2 million of state funds to extend the Ulster County Rail Trail.

The consent order complements programs set forth in the city's watershed management plan, which is under review. That plan includes $50 million for land acquisition, $15 million for a flood buy-out program and $17 million for a local flood hazard mitigation grant program.