Yorkshire Water has agreed to pay £235,000 to the Yorkshire Wildlife Trust following pollution in Harrogate, after eight years of inactivity.
The water company polluted Hookstone Beck in an unauthorised sewage discharge in August 2015.
Sewage fungus was found on the bed of the beck during a dry spell of weather.
After an investigation by the Environment Agency, the water company volunteered to donate money to the Yorkshire Wildlife Trust.
Get the latest environment news delivered straight to your device from The Northern Echo for just £4 for 4 months. Click here
The proposed donation has been accepted by the Environment Agency.
Alongside the financial donation, Yorkshire Water has upgraded its system in the area to allow continuous monitoring of the storm overflow.
Claire Barrow, Environment Agency Area Environment Manager, said: "Sewage pollution can be devastating to human health, local biodiversity and our environment.
"Storm overflows must only be used under strict permitted conditions that control their environmental impact.
"We are holding the water industry to account like never before and while we will always take forward prosecutions in the most serious cases, Enforcement Undertakings are an effective enforcement tool to allow companies to put things right and contribute to environmental improvements.
"They allow polluters to correct and restore the harm caused to the environment and prevent repeat incidents by improving their procedures, helping ensure future compliance with environmental requirements."
Sewage discharges from storm overflows are illegal during periods of dry weather.
The overflow only has a permit when the sewage tanks are full during heavy rainfall or snow melt.
A spokesperson for Yorkshire Water said: "We have made significant improvements in our operations since this incident in 2015, including installing telemetry across 98% of our CSOs with the remaining CSOs to be monitored by the end of this year. This helps to monitor our network and identify incidents of this nature so they can be corrected quickly.
"When things go wrong, we understand we have a responsibility to make it right.
"As a result, we have donated £235,000 to the Yorkshire Wildlife Trust, money which will be spent in North Yorkshire to continue to provide excellent land for the people and wildlife of Yorkshire to enjoy."
Read more
'Beast' tree smashes into church in North Yorkshire
North Yorkshire anglers take Environment Agency to court
Stockton MP starts debate on off-road biking scaring drivers
The Yorkshire Wildlife Trust plans to use the money on a range of environmental improvements.
One such project is the effort to reintroduce native crayfish in North Yorkshire.
Another programme which could benefit is the work on the Ripon City Wetlands nature reserve.
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here