A mountain-top wind farm has been scrapped after a judge ruled the spinning blades could kill rare red kites.
Developers wanted to build 27 turbines near a red kite protection area. Anyone found guilty of killing one of the birds can be jailed.
Bird-lovers and environmentalists feared the rare birds of prey would be threatened by the 410-ft high turbines planned in the Cambrian Mountains in the Mid-Wales countryside.
The green energy project to provide power to up to 100,000 homes was initially approved by a planning inspector following a public inquiry.
Developer Mynydd y Gwynt - Welsh for Mountain of Wind - wanted to build the turbines near Ponterwyd, Ceredigion, to take advantage of the breezes surrounding the rolling Welsh hills.
But the mountain top is an important breeding ground for red kites which have come back from fewer than 20 pairs in the 1950s to more than 400 pairs.
The plans were rejected by the then Secretary of State Amber Rudd over fears the red kites could be maimed and killed by the powerful blades.
Ms Rudd said she had received concerns "regarding possible impacts of the development on red kite feature from collision mortality as a result of the windfarm."
She added: "The Secretary of State has concluded that likely significant effects on red kites from collision risk during the operation of the turbines, alone, or in combination with other plans or projects, cannot be ruled out."
Mynydd y Gwynt challenged the government's decision in a judicial review saying there was "nil threat" to the red kites.
But Judge Mr Justice Hickinbottom dismissed the appeal at the High Court. He said: "There are important unknowns in this case."
Red kites are protected under the Wildlife and Countryside Act 1981 and anyone found killing one can face jail.