A farmer may be forced to take down his wind turbine after judges ruled the impact on a nearby listed church had been ignored.
Colin Bagley erected the 41.8m (147ft) high single wind turbine at Upper Pengarth, Llandeilo Graban, near Builth Wells, last summer.
Powys County Council had granted planning consent for the turbine in May 2015.
But London’s Court of Appeal overturned the permission and ordered the council to reconsider.
Lord Justice Lindblom ruled the council had failed to give “special regard” to preserving the setting of Grade II-listed Llanbedr Church, which is about one mile from the turbine, on the other side of a hill.
Although the turbine could not be seen from the church, both might appear in more distant views, the court was told.
The judge said the officer’s report on which the council based its decision made no mention of the impact the turbine might have on the church’s unspoilt rural setting.
The council might have decided the impact would be acceptable, but it “had to confront the issue” and its failure to do so was “deficient and therefore unlawful”.
The judge, sitting with Lord Justice Irwin, expressed “a good deal of sympathy” for Mr Bagley, whose wind turbine is now under threat.
But the council’s failure to grapple with the potential impact on the church’s setting meant the planning permission had to be quashed.
Lord Justice Lindblom urged the council to “lose no time” in reconsidering the turbine’s future.
The ruling was a victory for local resident, Graham Williams, who had opposed Mr Bagley’s proposals.
The Court of Appeal’s ruling was the second time Mr Williams had succeeded in overturning planning consent for the turbine.