* Coal exit is part of climate protection plan
* Merkel government is trying to restore green credentials
* Coal exit plan includes aid for affected regions (Recasts with comments from ministers, background)
By Markus Wacket and Paul Carrel
BERLIN, Jan 29 (Reuters) - The German cabinet on Wednesday backed plans to exit coal as an energy source by 2038 as part of efforts by Chancellor Angela Merkel's ruling coalition to protect the climate and restore its green credentials.
The government is spurring a shift toward renewable energy sources such as wind and solar power with exits from nuclear power by 2022 and coal-fuelled power sources by 2038.
"This is not just an exit from coal, it's an entry into renewable energy," Environment Minister Svenja Schulze told reporters.
Of the coal exit, she said: "We will cut a quarter of all CO2 emissions in Germany - that is a very important sign, internationally too, that Germany is taking its responsibility here."
Caught on the hop when a series of unusually hot summers and the impact of Swedish teenager Greta Thunberg's Fridays for Future movement caused public opinion to turn, the German government last year introduced a major climate package, which included economy-wide carbon pricing.
Germany aims to cut greenhouse gas emissions to 55% of its 1990 level by 2030. Last year, Merkel acknowledged her coalition's credibility on climate policy had been hurt by abandoning an earlier 2020 emissions cut target.
Designed to ensure Germany hits the 2030 target, the coal exit will be accompanied by heavy investments in renewable energy.
Economy Minister Peter Altmaier said last week Germany's transition to a fossil-fuel free energy mix will be like undergoing "open-heart surgery" as the car, steel and renewable industries will need to work hard to stay competitive.
As part of the plan, the government has agreed to compensate workers, companies and regional governments as it switches off plants by 2038.
The government has struck a deal worth more than 40 billion euros ($44 billion) with coal-mining regions.
"These regions need us to think about their future too," said Finance Minister Olaf Scholz, adding that the 40 billion euro package would "ensure the structural change succeeds".
A draft law approved by the cabinet to phase out hard coal-fired power stations envisages maximum phase-out compensation of 165,000 euros per megawatt in 2020, falling to 155,000 euros in 2021 and 2022.
The maximum sum would drop by about 25% annually thereafter before reaching 49,000 euros in 2026. There will be no further compensation after 2026.
Once the heartland of German industry, the coal regions of North Rhine-Westphalia have fallen on hard times as traditional heavy industries have lost sway, while coal regions in the east have yet to fully shrug off the impact of four decades in Communist East Germany.
The far-right Alternative for Germany (AfD) has sought to win votes in eastern Germany from the coal exit with a simple message: jobs are more important than the environment.
The oldest, dirtiest plants, some dating back to the 1950s, will go first. As well as phasing out hard coal power stations, the government also plans to exit brown coal, or lignite, of which Germany is the world's largest producer.
Brown coal generates about 19% of the country's electricity, but is considered the most polluting type of coal, partly because its low energy density means more must be burned. ($1 = 0.9014 euros) (Reporting by Markus Wacket Writing by Paul Carrel Editing by Thomas Seythal, Michelle Martin and David Evans)