Scotland’s green energy sector produced as much power last year as was generated by the traditional fossil fuel sector.

New figures released by the Department of Climate Change and Energy show that 32% of the electricity generated in Scotland in 2013 came from a renewable energy source.

Coal and gas-fired generation amounted to 31.7% of the total while nuclear remained the singlest largest electricity provider north of the border with a 34.9% share of the market.

The data shows a significant shift from 2012 when coal and gas were collectively responsible for 34.8% of output, nuclear provided 33.8% and renewables came in at 28.9%

The official full-year data reinforces analysis by trade body Scottish Renewables last month which found that green energy had become Scotland’s principle power source during the first six months of 2014.

However, despite the improving trend, the renewables sector has faced significant challenges this year not least with Scotland’s two major wave power developers Aquamarine Power and Pelamis each running into difficulties. “While these figures from the Department of Energy and Climate Change show renewables equalled fossil fuel power generation in 2013, we now know the amount of green energy produced in the first half of this year was actually even higher, making renewables Scotland’s main source of power,” Scottish renewables policy manager Stephanie Clark said.

“Technologies like wind, hydro, biomass and solar are now part of our mainstream electricity mix.

“Scotland’s clean energy industry is creating jobs, driving investment and helping communities across the country tackle climate change achievements of which we should all be rightly proud.”

The data also showed that scotland remained a net exporter of electricity in 2013 with a record 28% of overall generation being exported – a figure that has increased by 2% in comparison to the year previous.

When the electricity exported is taken into consideration, renewable sources of electricity accounted for 44.4% of Scotland’s power consumption in 2013, up from 38.8% in 2012.

The statistics also show that Scotland’s renewable electricity generation in the first three quarters of 2014 had grown by more than a fifth compared to 2013 – an increase primarily due to a strong performance from the hydro power sector and a 13% increase in wind output.

Energy Minister Fergus Ewing said the renewables sector in Scotland continued to go from strength to strength.

“We remain on track for our targets of 50% of demand by 2015 and 100% by 2020,” Mr Ewing said.

“Harnessing Scotland’s vast energy wealth has multiple benefits reducing our carbon emissions, creating jobs and investment and improving the energy security of Scotland and the rest of the UK. And of course communities the length and breadth of Scotland are also benefitting from millions of pounds of community benefit funding.

“We are committed to making Scotland a leading low carbon investment destination, delivering growth from the growing low carbon sector and ensuring communities across Scotland can benefit from the opportunities that the transition to a low carbon economy brings.”

WWF Scotland director Lang Banks added: “Alongside energy efficiency, renewables are proving themselves the foundation of a truly low carbon economy keeping the lights on, creating jobs and cutting emissions.”