Europe's environmental watchdogs are taking Ireland to court over the pumping of raw sewage into rivers and the sea.
They say 38 towns and cities have inadequate treatment plants for waste water, putting human health at risk, and leaving the country potentially liable for millions of euros in anti-pollution fines.
The European Commission is taking the case to the European Court of Justice after the Government failed to meet deadlines set for sewage plants to built or upgraded by the end of 2000 and 2005.
Warnings were issued over the threatened court action last year and in 2015.
Inspectors have identified inadequate sewage treatment plants in Clonakilty, Cobh, Cork city, Fermoy, Mallow, Midleton, Ringaskiddy, Youghal, Rathcormac, Passage/Monkstown and Ballincollig, all of which are in Cork.
In Donegal, Gaoth Dobhair, Killybegs and the Ballybofey/Stranorlar area are similarly classed.
In the Midlands and the east of the country issues were identified in Arklow, Castlecomer in Kilkenny, Dundalk, Enniscorthy, Oberstown and Ringsend in Dublin, Navan, Athlone, Monksland, Enfield, Longford and Portarlington.
Elsewhere, treatment plants are not suitable for the populations of Nenagh, Thurles, Roscrea in Tipperary, Killarney and Tralee in Kerry, Cavan, Clifden, Roscommon town, Shannon town, Tubbercurry in Co Sligo and Waterford city.
Authorities in Brussels said Ireland had until the end of 2000 to ensure any urban area with more than 15,000 people had adequate sewerage systems and until the end of 2005 to stop discharges from medium-sized towns into rivers, lakes and estuaries.
"One of the main challenges Ireland faces is maintaining the important investments required for water services, given the urgent need to invest in water infrastructure," the commission said.
The case also raises additional concerns over the operating licence that has been issued for treatment plants serving Arklow and Castlebridge.
Irish Water has estimated all sewage treatment plants will be upgraded by 2021 at a cost of €1.25bn.
The utility said: "Since taking over responsibility for water services in 2014, Irish Water has put in place a prioritised range of projects to deal with historic deficits and lack of investment in waste water treatment across the country.
"The utility has identified key projects in our current and recently approved future capital investment plans to address all non-compliances in our treatment plants by 2021 in each of the areas identified by the EU as part of this ECJ case.
"We are also carrying out detailed studies into a number of issues raised by the EU in relation to our waste water collection systems (network overflows) and full compliance for our networks will take longer, extending into the next investment programme."