Almost half the UK’s electricity came from clean energy sources such as wind and nuclear power last year, official figures have revealed.

Renewables accounted for a quarter of the country’s power supplies in 2015, outstripping coal power for the first time, the data published by the government revealed.

In total, low-carbon power sources, which produce little in the way of greenhouse gas emissions, supplied a record 46% of the UK’s electricity in 2015, as the amount of renewables grew and nuclear generation rose after outages in late 2014.

Coal supplied just over a fifth (22%) of power in 2015, down from 30% in 2014, while gas continued to provide around 30% of the UK’s electricity.

Nuclear power’s contribution rose slightly from 19% in 2014 to 21% last year, the figures from the Department for Business, Energy and Industrial Strategy showed.

The amount of onshore and offshore wind turbines and solar panels increased, while higher wind speeds and more rainfall boosted hydropower - helping to generate more clean energy.

And the UK’s biggest coal-fired power station, Drax, in North Yorkshire, switched another unit from coal to mostly burning biomass - most of which is wood pellets.

Overall, renewable sources - which include onshore and offshore wind, solar farms, hydroelectric dams and biomass - accounted for 25% of the UK’s electricity generation.

The total amount of generation capacity was down as several power stations closed, but some of the fall was offset by new renewables.

The government wants to phase out polluting coal-fired power stations by 2025 as part of efforts to tackle climate change, but only if new gas plants can be built to meet demand.

Industry body RenewableUK’s deputy chief executive, Maf Smith, said: “The Government took the right decision when it announced the phasing out of coal.

“Now we can see renewable energy filling the gap, replacing old technology with new. 2015 was the first year that renewables outperformed coal.

“A quarter of Britain’s power is now coming from wind, wave and tidal power and other renewable energy sources.

“Renewables are now part of our energy mainstream, helping us modernise the way we keep the lights on by building new infrastructure for the generations to come.”

Across all energy use - including power, heating and transport - renewables accounted for 8.3% of consumption, up from 7.1% in 2014.

The UK has a target under European Union rules to source 15% of its energy from renewables by 2020.