A controversial offshore wind project off the coast of Aberdeen has been approved by the Scottish government.
The 11-turbine European Offshore Wind Deployment Centre is bitterly opposed by US businessman Donald Trump, who has complained that it will spoil the view from his nearby golf course.
Fergus Ewing, the Scottish government's Energy Minister, said: "Offshore renewables represent a huge opportunity for Scotland – an opportunity to build up new industries and to deliver on our ambitious renewable energy and carbon reduction targets."
The centre will lie between 2km and 4.5km off the coast and will be capable of generating up to 100MW, providing energy to meet the needs of 49,000 homes, almost half the number in Aberdeen, the government said.
It aims to allow developers and supply chain companies to test new technology offshore before commercial deployment.
The application was given to Marine Scotland in August 2011 and went through a two-stage public consultation.
A planning decision for a substation at Blackdog, just north of the city, will be a matter for Aberdeenshire Council.
Ewing said the sector could generate more than £7bn for the economy in Scotland and support up to 28,000 direct jobs and 20,000 indirectly by 2020.
"The proposed European Offshore Wind Deployment Centre will give the industry the ability to test and demonstrate new technologies in order to accelerate its growth," he said. "The centre will also generate up to 100MW, enough electricity to meet the needs of almost half the homes in Aberdeen city.
"It secures Aberdeen's place as the energy capital of Europe. In consenting this application, I have put in place a number of conditions to mitigate a range of impacts. My role was in determination of assessing the offshore elements of this development in relation to the Electricity Act consent.
"An application for a marine licence, which is also required for the development, is under consideration and will be determined in due course. There is another consent relating to the Blackdog substation development which is also required and is a matter for Aberdeenshire Council."
The scheme was put together by Vattenfall Wind Power and Aberdeen Renewable Energy Group (Areg). Developers were told to set up plans to deal with concerns about the proximity to Blackdog firing range.
A "radar mitigation scheme" is also required.
The long-running application pitted Trump against First Minister Alex Salmond. His own scheme at Menie Estate, near Balmedie, also caused controversy, not least for building on an area of protected dunes.
The golf resort application was initially rejected by a local authority committee, causing turmoil among councillors, and was called in by the Scottish government.
The First Minister became local MSP for the area in 2007.
In an interview last month, Trump threatened legal action to halt the wind test centre.
"I built a masterpiece. I don't want to see it destroyed by windmills. Windmills are going to be the death of Scotland and even England if they don't do something about them. They are ruining the countryside," he said.