The Viking wind farm has fought off challenges relating to the lack of an electricity-generating licence and a failure to comply with an EU directive concerning rare birds. This latest ruling by the highest UK court means the project can now progress.
Scottish energy minister Fergus Ewing gave the developers the nod to go ahead with the project in 2012. But in October 2013, the Court of Session ruled that the government should not have granted consent.
This ruling was then overturned before a campaign group, Sustainable Shetland, took the case to the Supreme Court.
Viking is 50% owned by utility SSE. The other half is held by Viking Energy, which is 90% owned by community organisation Shetland Charitable Trust. The project is expected to use 3.6MW turbines.
A high voltage cable is planned to link Shetland to the mainland UK electricity grid, and the project is expected to be operational before 2020.