Germany set a new world record in solar power generation over the weekend when plants in the country produced 22gW of electricity per hour.

The solar power, equal to 20 nuclear power stations at full capacity, was fed into the national grid, meeting nearly 50% of the nation’s midday electricity needs.

Institute of Renewable Energy director Norbert Allnoch told Reuters: "Never before anywhere has a country produced as much photovoltaic electricity."

The record-breaking quantities helped solar power provide a third of Germany’s electricity needs on a work day, Friday, and nearly half on Saturday when factories and offices were closed.

The German government took the decision to move away from nuclear energy after the disaster in Fukushima last year. About eight nuclear power plants were closed immediately with the remaining nine due to be closed by 2022.

The plan is to replace them with a range of renewables, including wind, solar and bio-mass.

Generally, the country receives about 20% of its overall annual electricity production from renewables.

Germany’s solar power generation capacity nearly matches the rest of the world combined, with the country getting about 4% of its overall annual electricity needs from the sun alone.