BT is buying 50% of the electricity generated by the 48-turbine Fallago Rig windfarm in the Scottish Borders in a deal worth around £300million over two years.
The telecoms giant said the turbines would deliver enough energy to match the total power consumption of its operations throughout Scotland.
Fallago Rig, which is on land owned by the Duke of Roxburghe in the Lammermuir Hills, is the UK’s fifth largest onshore windfarm.
BT uses around 170 gigawatt hours (GWh) of energy every year north of the border.
Brendan Dick, BT Scotland director, said the purchase agreement with Fallago Rig – owned by EDF Energy Renewables – underpinned a “long-term commitment to the digital fabric of Scotland over the next 20 years”.
He added: “It’s fantastic that all of our Scottish infrastructure and estate will be matched with energy from renewable sources in Scotland in a deal which gives us long-term price certainty.
“BT is one of the UK’s biggest consumers of electricity and demand for our digital services, including fibre broadband, means we have to keep innovating to meet our needs in an environmentally responsible way.”
Mr Dick, a member of Scotland’s 2020 Climate Group, which was set up in 2009 in response to the Scottish Government’s climate change targets, said BT reduced its carbon emissions by 25.5% globally during 2013/14.
He added: “Our deal with Fallago Rig reinforces our commitment to make a positive contribution to society and the environment.
“It’s also a huge vote of confidence in Scottish renewable-energy.”
Energy Minister Fergus Ewing said: “It is great news for Scotland and the environment that a company the size of BT is taking a local and sustainable approach to sourcing its electricity in Scotland from renewable and low-carbon sources.
“With EDF Energy and BT now sharing 100 per cent of the energy produced by Fallago Rig, it also secures generation at the site for the long-term future and shows the importance of Scottish renewable energy to Scottish-based businesses and their customers.”