European energy firm Vattenfall will invest £300m in Scotland's largest offshore wind farm test facility.

The Swedish firm had planned to sell its shares in the Aberdeen Bay scheme, which has faced a series of legal challenges from Donald Trump, who owns a nearby golf course.

It has now reversed that decision and bought 100% of the European Offshore Wind Deployment Centre (EOWDC), saying the industry is now in a better position than it was in 2013.

Vattenfall has taken on the council-backed Aberdeen Renewable Energy Group (AREG)'s 25% stake in the 11-turbine scheme.

AREG carried out initial work on the Aberdeen Bay wind farm in 2003 and was expected to pull back from the project as it got under way.

Donald Trump has led a high-profile legal battle against the EOWDC, which he says will spoil the view from his Trump International Golf Links at Balmedie.

His attempts to overturn planning consent for the scheme have repeatedly been defeated in court.

The Trump Organisation claims 16 planning conditions for the EOWDC have not been met, but Vattenfall says they will be met before the completion of the project.

It added: "We intend to lodge formal written objections with Marine Scotland, challenging each one of them.

"The project can't proceed until the conditions are satisfied and we will also pursue additional remedies before the European courts as necessary."

Onshore work is scheduled begin at Blackdog later this year and construction will get under way in Aberdeen Bay in late 2017. The EOWDC is expected to generate its first power in spring 2018.