Germany is aiming to phase out its coal-fired power stations by 2038 at the latest, in the country's latest move aimed at cutting carbon emissions.
The plan, which was agreed between the government and coal-producing states, will involve paying out compensation of 40 billion euros ($44.67 billion) to affected workers, companies and regions.
Germany wants to end its use of lignite in power plants over the next 18 years. Lignite, known as "brown coal," is the most polluting type of the fossil fuel.
The plan is aimed at reducing greenhouse gas emissions and is part of a drive to generate more of the country's electricity from renewables.
Germany aims to have 65 percent of its electricity generated from renewable energy sources by 2030. The plan is considered a significant step towards that target, as the country currently generates 35 percent of its electricity from renewables.
Coal is considered a major factor in global warming and it produces about a third of Germany's electricity, half of which is garnered from burning lignite.
"What we have here is a good agreement for climate protection because it makes it clear that we are taking it seriously," Germany's economy minister, Peter Altmaier, told reporters.
The agreement comes after lengthy talks between the government and the country's coal-producing states that went on until the early hours of Thursday morning.
It is expected that some plants will be shut down as early as this year.
The government said the 40 billion euros of compensation will be used to retrain workers in the sector and will be invested in infrastructure projects. Mines and utility companies that are affected will also be compensated.
The compensation is aimed at four states in Germany, which have lignite mines and coal-fired power plants – Brandenburg, Saxony-Anhalt, Saxony, and North Rhine-Westphalia.
The government plans to draft a law for exiting coal power later this month.
Worries still abound that phasing out coal-fired power could result in a shortfall of electricity production, considering that Germany is also phasing out nuclear power over the next couple of years.