In a pioneering move, a German government-appointed panel has recommended the country stop burning coal to generate electricity by 2038 at the latest, as part of efforts to curb climate change.

The Coal Commission reached a deal early on Saturday following months of wrangling that were closely watched by other coal-dependent countries.

“We made it,” Ronald Pofalla, the head of the commission, told reporters in Berlin. “This is a historic effort.”

Germany gets more than a third of its electricity from burning coal, generating large amounts of greenhouse gases that contribute to global warming.

The 28-member panel, representing mining regions, utility companies, scientists and environmentalists, suggests a review in 2032 could bring forward the coal deadline to 2035.

The plan foresees billions in federal funding to help affected regions cope with the economic impact, and to shield industry and consumers from higher electricity prices. The energy transition will also need a huge overhaul and modernisation of the country’s power grid, the commission’s members said.

The decision still needs government approval.

In comparison the UK is currently aiming to completely eradicate the use of coal by 2025 and France by 2022.

“The whole world is watching how Germany — a nation based on industry and engineering, the fourth largest economy on our planet — is taking the historic decision of phasing out coal,” said Johan Rockstroem, the director of the Potsdam Institute for Climate Research. “This could cascade globally, locking in the fastest energy transition in history.”

The plan foresees that Germany’s coal plants will be phased out step-by-step to reduce the output of greenhouse gases. Currently, Germany’s coal plants produce the largest amount of carbon dioxide of any country in Europe.

The commission’s plan leaves open which plants should be shut down first, saying it is a decision the government needs to negotiate with the plants’ operators, the German news agency dpa reported.

IPCC: limiting global warming would require 'unprecedented changes', says Professor Jim Skea

The commission suggests in the next ten years, the government should help create up to 5,000 new jobs in the affected regions when coal mining will be phased out. These regions — in the states of North Rhine-Westphalia, Brandenburg, Saxony-Anhalt and Saxony — should also get federal subsidies totalling 40bn euros (£34.6bn) in the next twenty years.

“New jobs will be created through structural measures in the coal mining regions,” Mr Pofalla said. “We will keep up secure and affordable energy supply and the agreement will lead to sustainable climate protection in Germany.”

Germany is committed to an “energy transition” that involves replacing fossil fuels with renewable sources such as solar and wind power.

While the country has made great strides in that direction — renewables beat coal for the first time last year — removing coal from the power equation entirely is a major challenge.

The reduction in coal will have to be compensated by an increase in renewable power sources and — at least in the interim — from burning more natural gas, which emits about half the amount of greenhouse gases as coal.

Greenpeace, which wants all coal plants shut down by 2030, welcomed that “Germany finally has a timetable how the country can become coal-free” but said the measures were not ambitious and fast enough.

“The speed is wrong,” said Martin Kaiser, the head of Greenpeace. “Exiting coal only by the year 2038 is unacceptable.”

The country’s environmental groups welcomed the commission’s recommendation that Hambach Forest in western Germany, an ancient woodland that became a flashpoint of anti-coal protests last year, should be saved.

Energy company RWE’s plans to cut down half the Hambach Forest to expand a lignite strip mine had seen protesters camping out in the trees for months to block workers from cutting them.

An opinion poll released by public broadcaster ZDF found 73 per cent of Germans agree a quick exit from coal is very important. The telephone poll of 1,285 people, conducted 22-24 January, had a margin of error of about three percentage points.