A SPANISH renewables company has announced plans to build a wind turbine manufacturing plant in Leith, creating around 800 jobs.

The £125 million investment by Gamesa will establish a new factory on a site at the Edinburgh port, which will make the enormous blades for offshore turbines as well as the generator units that sit at the top of the turbine.

The blades, which can be 50m long, will be made for turbines set to be built around the British coast.

Gamesa has signed a memorandum of understanding with Forth Ports for the site and the two will work together in preparation for a longer-term agreement. The port was competing with Hartlepool for the investment, with Dundee also under consideration.

First Minister Alex Salmond, told of the decision by Gamesa's global chairman Jorge Calvet, said it was "validation" of the Scottish Government's pursuit of a low-carbon economy.

Niall Stuart, chief executive of Scottish Renewables, said: "We have fought off incredibly strong competition from other parts of the UK for the location of the company's manufacturing facility, which is a fantastic addition to the growing list of major employers in renewables in Scotland.

"This reinforces the massive benefit renewables is having on our economy, and the role the sector will play in getting out of the downturn and in getting the labour market moving again."

WWF Scotland director Dr Richard Dixon said he believed the country is now a key player in the renewables industry.

He said: "Renewable energy will be bigger than oil for Scotland and the Government needs to put it even more firmly at the centre of its economic and jobs strategies. Together, renewable energy and energy efficiency can get us off our oil addiction and create one of the world's first modern zero-carbon economies."

Mr Salmond said: "I'm delighted Gamesa has chosen Scotland and the fantastic Port of Leith as its preferred location.

"Their decision, coming less than a year after opening their offshore wind technology centre near Glasgow, follows many detailed discussions with the Scottish Government, SDI [Scottish Development International] Scottish Enterprise and the company's own careful analysis of locations offering the optimum environment to deliver its product."

Prime Minister David Cameron, meanwhile, said it showed the UK remained an attractive place for foreign investment.

He said: "Scotland benefits from UK-wide initiatives to promote renewables and access to the entire UK consumer market. That, coupled with the economic security that comes from being part of one of the world's most successful unions, makes Scotland an obvious place for companies like Gamesa to invest in."

Scottish Secretary Michael Moore welcomed the announcement as a "vote of confidence" in Scotland and the UK.

He said: "It reinforces the fact we have the skills to attract investment from around the world and that the UK Government's commitment to the offshore renewables sector acts as an attractive prospect for business.

"Gamesa is a good example of the UK-wide success of the renewables industry, as the firm already has a research and development centre in Glasgow and its offshore wind HQ in London. I am very glad to see the decision has gone Scotland's way."

The UK Government wants 18gw of energy produced offshore by 2020, provided costs come down.