Construction on one of the world's largest tidal power projects will begin in the Pentland Firth later this year, Energy Minister Fergus Ewing has announced.
Once completed, the 269-turbine development could power almost 175,000 homes and support more than 100 jobs in the north of Scotland.
The £20.5 million investment was made possible by the Scottish Government's Renewable Energy Investment Fund (REIF) and funding from Highlands and Islands Enterprise (HIE).
It is part of a total package of £51 million to MeyGen for the four turbine demonstration phase of its tidal stream array project.
The UK Government has provided £10 million worth of grant funding to the MeyGen project through its Marine Energy Array Demonstrator (MEAD) scheme, set up in 2012 to support marine power projects.
Other funders include the Crown Estate and the company Atlantis Resources, the Department of Energy & Climate Change said.
Mr Ewing said: "The funding announced today will help bring to life innovative and exciting plans to develop the world's largest tidal power project in Scotland.
"Our ambition for Scotland's emerging wave and tidal sectors remains great. The Pentland Firth development takes our ambition to the next level and further cements Scotland's reputation as a world leader in deploying renewables technology.
"We know that the successful harnessing of ocean power takes hard work and persistence which is why we are determined to support those in the industry.
"By developing clean, green energy we are creating opportunities for communities in the north of Scotland and delivering jobs and investment."
Lena Wilson, chief executive of Scottish Enterprise said: "We're already leading the world in terms of research and development facilities for the tidal sector, and have more tidal devices being tested in our waters than anywhere else in the world. The plans for the Pentland Firth are further evidence of Scotland's position as one of the key players in the fast growing renewables sector at a global level."
Calum Davidson, HIE's director of energy and low carbon, said: "The MeyGen project is the first commercial scale tidalstream array to be developed and built out.
"HIE is delighted by today's announcement as it gives a strong green light to the start of the construction phase of the project. It is a huge boost to the Highlands and Islands which is being rightly recognised as a global centre for marine renewables. We have world class wave and tidal conditions here, as well as expertise across the engineering and marine supply chain supported by a skilled and dedicated workforce. HIE is looking forward to working with MeyGen as the project develops in the coming months."
UK Energy Secretary Ed Davey said: "This innovative and exciting project puts Scotland and the UK on the map as a global leader in marine technology - meaning jobs, better energy security and the potential to export this technology to the world.
"The project also shows what can be done when the UK and Scottish Governments work together to provide a lasting benefit for the people of Scotland.
"MeyGen will be the biggest tidal stream array in the world, providing enough electricity for 175,000 homes and 100 'green jobs' when completed.
"Wave and tidal power have the potential to provide more than 20% of the UK's electricity needs, and MeyGen could pave the way for future projects in the Pentland Firth."