A legal challenge will go ahead into mine expansion plans after opponents were granted a judicial review.
In January approval was given for another 40 million tonnes of coal to be dug at Aberpergwm, Neath Port Talbot.
Campaigners said at the time they were considering legal action.
The Welsh government, which declined to comment citing the legal proceedings, has previously called for an overhaul of the Coal Authority following the dispute over the plans.
Protest group Coal Action Network has said it was preparing to go to court.
It tweeted: "We don't know how to give up because there is everything to fight for."
📢📢It's official: a judge approved our Judicial review of the disastrous Aberpergwm coal mine expansion! We'll see you in court @WelshGovernment & @CoalAuthority🧑⚖️— Coal Action Network (@CoalActionUK) July 1, 2022
We don't know how to give up because there is everything to fight for ✊ pic.twitter.com/ZsSKC8MWB0
The colliery is the only producer of high-grade anthracite in Western Europe and supplies nearby Tata Steel plant in Port Talbot.
However, the mine's operator Energybuild has said most of the coal will be used for processes such as water filtration and to make batteries for electric vehicles, rather than being burned.
The legal action has been backed by the Welsh Liberal Democrats.
The party's leader Jane Dodds called on the Welsh government to "say no to more coal" and accused it of dithering over the planned Aberpergwm expansion.
She said the expansion of the mine should be stopped.
Ms Dodds said: "While some will point to the jobs it creates, communities near Aberpergwm should instead be given a leading role in the development of the green hydrogen strategy being developed in south Wales, ensuring a just transition and jobs for the communities that will last long into the future rather than a decade at most."
Welsh government ministers have previously said that the responsibilities of the Coal Authority - which is overseen by the UK government - clashed with the UK's climate change commitments.