Energy minister Fergus Ewing said the project, under development by Enel Viento, will generate about £9m ($15.4m) for the local economy.

The Edinburgh government noted that the developer had set up a community trust to support local initiatives.

But the Scottish government rejected a 21-turbine proposed wind farm at nearby Fauch Hill, planned by project company FHSE.

Ewing said: “We want to see the right developments in the right places, and that is why I have refused permission for the proposed wind farm at Fauch Hill, which I consider would have brought unacceptable impacts on the landscape, particularly the Pentland hills.”