The 103-turbine development is planned by Viking Energy Partnership which brings together the oil-funded Shetland Charitable Trust, energy giants SSE and the owners of the existing five-turbine Burradale wind farm in Shetland.
But the plan has divided island opinion for years. Its supporters have claimed it would help sustain the economy as oil begins to run out, bringing an annual income of about £30 million to the islands of 22,000 people.
Loading article content
But opponents fear the wind farm's environmental impact.
Campaign group Sustainable Shetland had sought a judicial review of the Scottish Government's decision in April 2012 to approve the development as long as the turbines were reduced from 127 to 103. The original plan was for 150.
In a ruling last September Lady Clark of Calton said that she was not satisfied that ministers had complied with their obligations under the European Wild Birds Directive 2009, thereby blocking the development.
But ministers appealed and Lord Brodie has delivered the opinion that the consent was lawful and there had been no breach of the birds directive.
A Scottish Government spokeswoman said it was a positive outcome. "Today's decision allows work to begin towards delivering this wind farm project," she added.
But Sustainable Shetland vice-chairman James Mackenzie said the group was "disappointed it has gone in the ministers' favour".
He said: "I haven't studied the legal argument closely to say more, but our options now depend on the legal advice we are getting, and also on consulting our committee and our membership at large. We are still opposed to this development and we would not have done all this without the support of the membership and many other people who have been so generous."
But Viking Energy Shetland chairman Alan Bryce said: "We are pleased that the judges have found in favour of Scottish ministers, who awarded consent to build the wind farm more than two years ago.
"Their decision has been vindicated today and we can now move on. We believed the consent decision would stand up to the closest scrutiny and this outcome validates our position that this project can benefit the local and wider environment."
He added that Viking Energy was "in this for the long haul" and continued to look forward to advancing plans to build "what could become the world's most productive wind farm and a crown jewel of Shetland's economy".