The world's first floating wind farm has started to supply electricity to the grid after being officially opened by the First Minister.

Nicola Sturgeon was flown over the Hywind development, where giant turbines around 15 miles off the shore of Peterhead, Aberdeenshire, could provide sufficient power for more than 20,000 homes.

The project has been developed by Norwegian state energy company Statoil, with floating turbines installed on about 2.5 square miles of water in the North Sea, where the average wind speed is about 10 metres per second.

The Hywind project features five turbines each 830ft tall, with 256ft submerged under the sea and anchored to the sea bed by cables.

Each turbine is more than three times the height of New York's Statue of Liberty, Ms Sturgeon said.

The First Minister said: "Hywind will provide clean energy to over 20,000 and will help us meet our ambitious climate change targets.

"This marks an exciting development for renewable energy in Scotland."

Irene Rummelhoff, executive vice-president of new energy solutions for Statoil, said the turbines could be put in areas with a water depth of up to 800m, which have so far been out of bounds for offshore wind.

"The learnings from Hywind Scotland will pave the way for new global market opportunities for floating offshore wind energy," she said.

Environmental campaigners welcomed the opening.

Gina Hanrahan, acting head of policy at WWF Scotland, said: "Offshore wind is already an industrial success story across the UK, cutting emissions, creating jobs and dramatically driving down costs.

"By demonstrating the commercial viability of floating wind, Scotland can help to develop the industry in new frontiers and deeper waters."