The European Commission is referring the UK to Court over poor wastewater collection and treatment.
It said 17 localities do not meet stringent standards, posing a threat to human health, inland waters and the marine environment.
In Banchory, Stranraer, Ballycastle and Clacton, treatment is “inadequate” while Gibraltar has no treatment plant at all.
Ten other areas, including Winchester and Chelmsford, have waste water discharging into sensitive areas such as freshwater lakes and estuaries and still do not meet EU requirements that were meant to be implemented by 1998.
The case also concerns excessive spills from storm water overflows in collecting systems in Llanelli and Gowerton.
“Innovative and environmentally positive sustainable urban drainage solutions are now being implemented to improve the situation. However the current spill rates are still too high and compliance is not foreseen before 2020. The deadline for having in place compliant collecting systems for these agglomerations was end 2000,” the Commission stated.
The Department for Food, Environment & Rural Affairs (Defra) said it is “working hard” to improve the wastewater plants.
A spokesperson added: “Working with water companies, we have secured around £13.5bn to improve infrastructure and are confident that we will be able to make the necessary improvements to get all treatment plants up to the EU standard by 2016.”
The Commission is also taking the UK to Court for failing to reduce emissions at one of its coal-fired power stations.