Solar panels generated more electricity than coal in the past six months in a historic year for getting energy from the sun in the UK, according to a new analysis.

Research by the Carbon Brief website found that solar generated nearly 7,000 gigawatt hours of electricity between April and September, about 10 per cent more than the 6,300GwH produced by coal during the same period.

The figures represent a dramatic turnaround in the UK’s electricity supplies.

The first ever day when solar produced more than coal was only on 9 April – when there was no coal-fired electricity for the first time since 1882. But then May became the first ever month when this happened.

Solar capacity nearly doubled in 2015, but has been hit hard by cuts to Government support, which is currently needed to persuade investors to build any kind of power generation, including fossil fuels.

James Court, head of policy at the Renewable Energy Association, said: “Solar overtaking coal this summer would have been largely unthinkable five years ago.

“This new data shows its popularity amongst homeowners and businesses and its falling costs. Now that we have a significant global and domestic industry, solar is one of the cheapest forms of power.

“Government policy stability is critical, however, Solar PV deployment in August 2016 was one third of what it was in August 2015 due to the sudden and severe changes to policy in the past year.”

The trend is unlikely to continue however, because there is less sunlight and a rise in demand for heating and lighting during the winter months, coal will once again overtake solar.