An anti-wind farm group has failed in its bid to have a judicial review of Highland Council's approval for 18 turbines planned for a site on Skye.
Lord Hodge considered Swag's legal challenge
Engineering group Amec has planning permission from the local authority for the development at Edinbane.
Campaign group Skye Wind Farm Action Group (Swag) launched a legal challenge in the Court of Session in Edinburgh.
It claimed the council failed to properly assess the proposal's effect on a protected conservation area.
Judge Lord Hodge said he was not persuaded that the council acted illegally in carrying out further appraisals of the views of agency Scottish Natural Heritage.
He also ruled against the objectors over a number of other challenges to the granting of planning permission for the project.
Lord Hodge said he was satisfied that the local authority did not act unreasonably when it did not instruct Amec to consider alternatives to the Edinbane site.
David Hodkinson, managing director of Amec's wind energy business, welcomed the judge's ruling.
He said: "We are confident that the Edinbane wind farm will make a real contribution to renewable energy generation and to the local economy.
"We now look forward to delivering this project safely and with due consideration to the communities of Edinbane and Struan, whose support throughout the planning process has been inspiring."
A spokesman for the group said: "Swag is naturally disappointed by the outcome of the case.
"The arguments were finely balanced and the conclusion seems to be that while the council's procedures fell short of the ideal, the decision was not illegal.
"We will need to consider the judgment in detail before deciding on our response and a possible appeal."