Concerns that turbine blades could harm protected red kites have led to a planned wind farm in the Cambrian Mountains being thrown out.
Developer Mynydd y Gwynt hoped to build 27 turbines standing 125 metres (410ft) tall near Ponterwyd, Ceredigion.
The plan won backing of a planning inspector after a public inquiry, but permission was refused by government last November.
A judicial review challenge in the High Court has now been dismissed.
Red kites are protected under the Wildlife and Countryside Act 1981 and anyone found killing one can face jail.
Despite being recommended to approve the scheme, then Energy and Climate Change Secretary, Amber Rudd, refused permission last year.
Her concerns centred on it being near the Elenydd Mallaen special protected reserve and she was unconvinced it would not pose a threat to red kites.
However, the company challenged the decision, saying the threat to the birds was “nil” and Ms Rudd misunderstood steps it would take to safeguard them.
But their claims were rejected by Mr Justice Hickinbottom who ruled that Ms Rudd made no legal error.
He said there were “important unknowns” in the case.
These included doubts about the number of red kites that might stray from the special protection area to forage on the site of the proposed wind farm.
|Wind Watch relies entirely
on User Contributions