Scotland’s most senior judge has reversed a decision to halt the developments in the Forth and Tay, which could power 1.4 million homes and create thousands of jobs.
Scottish ministers granted planning consent for the Inch Cape, Neart na Gaoithe and Seagreen Alpha and Bravo projects in 2014.
But RSPB Scotland challenged the decision over fears that the 335 turbines could kill thousands of protected seabirds, including puffins, kittiwakes and gannets.
The conservation charity claimed the Scottish government had acted unlawfully when considering the applications.
The Outer House of the Court of Session upheld the complaint in a ruling by Lord Stewart last summer.
He said ministers had breached legal requirements to give proper consideration to the areas being a haven for rare wildlife.
He also found the government had erred during environmental assessments and acted unlawfully by considering “unconsulted information” when making the decisions.
The Scottish government had previously estimated the proposed wind farms could generate between £314 million and £1.2 billion for the Scottish economy.
The Holyrood administration also estimated the developments could create between 2,567 and 13,612 jobs in Scotland during the building period.
But Lord Carloway, the Lord President, has now dismissed the judgement, saying his colleague had interpreted the law incorrectly and the Scottish Government had acted properly.
Stuart Housden, director of RSPB Scotland, expressed dismay at the outcome of proceedings and said his team would need time to consider the findings before deciding on any future course of action.
He said the charity had spent nearly nine years consulting on the schemes in an effort to minimise the risk to globally important wildlife.
“Whilst we fully support deployment of renewable energy, this must not be at any cost,” he said.
“These could be amongst the most deadly wind farms for birds anywhere in the world.
“It was with great reluctance and as a last resort, but in these circumstances, it was clear that RSPB Scotland had to make a stand.
“While we are deeply disappointed with today’s decision, given the huge threat to Scotland’s wildlife from these projects, we do not regret our actions so far.”
The judgement has been welcomed by the wind farm developers.
• READ MORE: New push to encourage green energy events in Glasgow
It’s thought construction will soon begin on the £2 billion 450MW Neart Na Gaoithe scheme in the outer Forth estuary, which is fully funded and already has a power contract in place.
Developer Mainstream Renewable Power said the 64-turbine wind farm would help Scotland and the UK meet climate and energy targets, as well as creating more than 500 jobs during construction and more than 100 when it is powered up.
David Sweenie, the firm’s offshore manager for Scotland, welcomed the ruling.
“This £2bn project is capable of supplying all the homes in a city the size of Edinburgh with clean energy,” he said.
“We plan to move quickly with all our partners to bring this project to construction, and deliver the vitally important jobs and investment that it will create.”
A spokesman for Edinburgh-based Red Rock Power, the company behind the 600MW Inch Cape array, acknowledged the “important and continued role that RSPB has in protecting our internationally important wildlife”.
He said the Red Rock team would continue to work with the conservationists to minimise any environmental impacts from the 72-turbine development, which will be sited around nine miles off the Angus coastline.
Energy Minister Paul Wheelhouse stressed the Scottish Government’s commitment to low-carbon offshore wind energy, which he says offers “a huge economic opportunity for Scotland” and plays a key role in fighting climate change.
However, he insisted that protecting the marine environment remained of “paramount importance” when considering plans for renewable energy developments.
RSPB Scotland has three weeks to decide whether to appeal against the ruling.