More than 2,000 fish have died after pollution left a river looking like a bubble bath.
The foam was first spotted in the River Great Ouse in Brackley, Northamptonshire on Friday, 29 June and travelled onto Buckingham.
The Environment Agency said the unidentified substance has now “sufficiently diluted” and is no longer “causing any issues”.
One Buckingham resident described it as like a “washing machine has exploded”.
Agency officers have provided the casualty figure, but believe the number of dead fish could be higher as the “pollution has severely impacted the river’s ecosystem”.
They said it may take “years” for the river to recover.
The Environment Agency is investigating the incident, and a spokesman said they were waiting for sample results to confirm the pollutants, which may contain detergents.
He said: “We believe that the pollutant has now passed through Stony Stratford and into Milton Keynes with no immediate adverse impacts on aquatic life past Thornton, Buckinghamshire.”
They do not believe there is a risk to humans or animals, but as a precaution are asking people to stay out of the river and keep pets and livestock away from the stretch between Brackley and Milton Keynes until the investigation is complete.
Anglers are also being asked not to fish in the polluted areas.
After Buckingham, the 140 mile (230km) long river flows through Milton Keynes, Bedford, St Neots, Huntingdon, St Ives, Ely and The Fens before entering The Wash at King’s Lynn.