A year ago, a government-appointed panel recommended that Germany stop burning coal to generate electricity by 2038 at the latest, as part of efforts to curb climate change.
However, efforts to translate that into policy had stalled over recent months. Some areas, particularly in the less prosperous east, are heavily dependent on lignite coal mining.
Federal government officials and governors of affected states agreed on a "path to shut down" coal-powered plants at a meeting that ended in the early hours of Thursday, the government said in a statement.
It said that reviews will be carried out in 2026 and 2029 to determine whether Germany can exit coal-fired electricity generation in 2035, three years before the final deadline. Many other details weren't immediately available.
Germany gets more than a third of its electricity from burning coal, generating large amounts of greenhouse gases that contribute to global warming.
The federal government already has approved a plan to spend up to 40 billion euros ($44.6 billion) by 2038 to cushion the impact on coal-mining regions of abandoning the fossil fuel. That money is supposed to start flowing once parliament has passed legislation setting out the dates and terms of Germany's exit from coal.