Plans for a €500 million wastewater treatment plant in north Dublin have been given the go ahead by An Bord Pleanála.
The facility, which local residents labelled a "monster sewage plant", provoked more than 14,000 objections.
But Irish Water said the plant at Clonshaugh near Dublin Airport was necessary to cater for future population growth and because the Ringsend plant is operating at over capacity.
It applied for planning permission and a compulsory purchase order to build a 13km underground orbital sewer from Blanchardstown to the planned wastewater treatment plant at Clonshaugh that will intercept existing flows to Ringsend.
The permission also allows for a 12km outfall pipeline to bring the treated wastewater from there to Baldoyle and out to sea for discharge around 1km north east of Ireland's Eye.
Irish Water said at an oral hearing that sea conditions there will allow for "optimal dispersal" of the effluent which will have been treated with ultraviolet disinfectant.
The board made an environmental impact assessment and said the plant would have positive long-term impacts to population and human health, by providing adequate wastewater treatment and supporting planned residential development.
It also stated that the plant would protect bathing water standards by reducing reliance on the Ringsend facility.
It states that "bathing water quality will not be reduced even in the highly unlikely event of a failure of the plant due to the location of the diffuser in an area of high natural dispersal characteristics".
The board also said that once the plant is built, odour control measures will ensure that odour emissions do not cause a nuisance beyond the boundary of any of the facilities.
However, in its decision, the board said there would be negative temporary effects during construction involving noise, vibration and disturbance which would may have to include the rehousing of some residents.
Other areas affected would include parts of Connolly Hospital and St Francis Hospice but mitigation measures will included a 1km tunnel to accommodate the orbital pipeline through the campus.
There would also be "slight or short and very localised negative impacts" on marine mammals and birds during construction.
Local residents, farmers, water sport clubs and environmentalists had opposed the plan fearing the effect on the local land and the sea.
In particular they questioned the effect on Dublin Bay's UNESCO designation and in particular Ireland's Eye, which will be near the outfall.
Many local politicians made submissions questioning the plan including Minister for Communications, Climate Action and Environment Richard Bruton who represents Dublin Bay North.
He called for the "suitability" of the proposal to be "robustly questioned".
Local campaigners had vowed to take their opposition to Europe.