A price for emissions of carbon dioxide has also been agreed that will take effect via trading in emissions certificates.
The aim is for petrol and diesel to rise in price by three euro cents (3.3 cents US) in 2021, increasing to 10 cents by 2026. Petrol currently costs around 1.40 euros a litre and diesel around 1.30 euros in Germany.
The government's stated aim is to cut greenhouse gas emissions by 55 per cent by 2030, by comparison with 1990 levels. This implies a cut from 866 million to 563 million tons a year.
The country is expected to miss the interim target set for next year.
Setting a carbon dioxide price was a crucial aspect of the talks, as was funding for expanding the use of renewables.
Land-based wind power has run into regulatory obstacles, with local residents objecting to their construction.
Much of the focus was on transport during the talks. Emissions have stalled at 1990 levels, despite considerably more efficient engines, as a result of a rise in personal travel and goods freight.