image copyright image caption Rules control the use of slurry by farmers
Rules to tackle the pollution of rivers in Wales will be challenged in the High Court by a farmers union.
NFU Cymru has secured the right to ask a judge to intervene.
This will argue that the way the Welsh government managed the Nitrate Vulnerable Zone (NVZ) across Wales was illegal.
Ministers say regulations - which control theway slurry and fertilizers are used - are essential for combating pollution incidents.
Prime Minister Mark Drakeford said in February that there had been three incidents per week in each of the past three years.
"More than 90% of ammonia emissions in Wales come from agriculture "he said.
" The level of incidentspollution in agriculture harms the reputation of farmers, they harm our environment. "
He had been accused of reneging on a promise to delay the implementation of the changes - which are being put phased in over three years from April 1 of this year - until after the pandemic.
image copyright Afonydd Cymru image caption The Welsh government says river pollution incidents occur on average three times a week in Wales
The decision to putThe implementation of the NVZ angered the agricultural industry, with unions calling it "draconian " and "punitive ".
A farmer complained that many in the industry would face a six-figure sum to comply.
Farms subject to the new regulations will have to modernize their slurry storage facilities, allowing a supply capacity of five months.
It will need to be covered to reduce the amount of rain that can fall into the slurry.
There will also be periods between August and January where slurry spreading will be banned.
If the new regulations are not followed, farmers risk losing some or all of their basic payment allowance.
NFU Cymru argues that Welsh ministers failed to take "all relevant information" into account when drafting an impact assessment prior to the introduction.oduction of the settlements.
Its chairman John Davies said: "We are pleased to learn that the court has accepted our application for leave for judicial review and that the issues we have raised grounds defendants that merit consideration in a hearing on the merits. "
No date has been given for the hearing.
A door -speech from the Welsh government said: "We cannot comment on ongoing legal issues.