Plans for the world's largest commercial wave energy farm have been given the go-ahead.

The Scottish Government has approved proposals which could see up to 50 wave energy devices installed in the waters off the north-west coast of Lewis, in the Outer Hebrides.

Developers Aquamarine Power said when fully completed it could produce as much as 40 megawatts of electricity - enough to power almost 30,000 homes.

The company said the project was the largest of its kind in the world to have full consent.

Watch a video animation of the wave farm below.

Video by Aquamarine Power

Chief executive officer Martin McAdam said the Scottish Government's approval for the development was a "significant milestone" for the firm.

Scottish energy minister Fergus Ewing announced Aquamarine Power had been granted a licence to "develop the largest commercial wave array in the world" at the All Energy Conference in Aberdeen.

"This is another significant milestone for Scotland's wave sector," Mr Ewing said.

"With 10% of Europe's wave power potential and 25% of its offshore wind and tidal power potential, the opportunities for Scotland are enormous."?

Mr Ewing also used the conference to announce Scotland will be the first part of the UK to have a dedicated fund to help with the development of the wave energy sector.

The £18 million Marine Renewables Commercialisation Fund (MRCF), which was launched last year, is to be used to provide support for the wave energy industry.

Projects will be able to apply for cash from next month, with funding expected to be awarded this summer.

Aquamarine Power is testing the Oyster device at the European Marine Energy Centre in Orkney.

The company hopes some of the devices could be installed in the water along the coast of Lag na Greine, near Fivepenny Borve in Lewis, by late 2017 or early 2018, with more installed over the next decade.

The project depends on further development of the Oyster devices, as well as the necessary infrastructure being in place to connect the scheme to the national grid.

Mr McAdam said: "The goal of our industry is to become commercial, and to do this we need two things - reliable technologies and a route to market.

"Our engineers are currently working hard on getting the technology right and we now have a site where we can install our first small farm, with a larger-scale commercial build out in the years ahead."

He added: "We believe wave energy presents an important opportunity for the Isle of Lewis. Our development could provide significant economic benefit to the local community.

"In Orkney, for example, we have spent over £5 million in the local economy during the installation of the first two Oyster devices and have worked with over 40 local companies as part of our commitment to sourcing much of the services and expertise we require locally."