Chancellor Angela Merkel's government has reached a deal on a broad climate plan for Germany that commits at least €100bn by 2030 to environmental protection, as tens of thousands of protesters rallied demanding action.

After marathon overnight talks dragging more than 18 hours, the coalition sealed a deal which covers a slew of measures from tackling emissions in the energy and industrial sectors, to incentives for zero-emission electric vehicles or public transport.

Under the plan, flight prices will go up while train tickets will get cheaper. Some €86bn will be ploughed into railway infrastructure, and funding will be provided to test innovative ways to incite more people to use public transport such as 365-euro annual tickets.

"By 2030, a total of ... a three-digit billion euro figure will be made available for climate protection and the energy transition," according to the summary of the sweeping plan.

The government said the investment would not affect its plans to keep the budget balanced, but that it would help to "support the economy".

As the politicians emerged red-eyed from their marathon talks, across Germany, protesters were out in the streets with colourful banners and posters with slogans like "make rainforests great again" or "I want a hot date, not a hot planet".

German students march in thousands as part of the "Fridays for Future" protests

In the biggest international wave of Fridays for Future climate strikes to date, initiated by Swedish teen Greta Thunberg, a major bridge in central Berlin was blocked off by demonstrators who strung red and white tape across the streets, while in the financial capital Frankfurt, sit-ins were under way.

After two blistering summers and thousands of youths joining school strikes week after week, climate has shot to the top of the political agenda in the EU's biggest economy.

For Ms Merkel's coalition government, the stakes are also rising.

With the economy already projected to slide into recession in the third quarter, balancing the interests of its crucial export industries while not alienating young voters with their green demands was proving to be a tough balancing act.

'Life-destroying crisis'

The EU's biggest economy is set to miss climate targets for next year but has committed itself to meeting the 2030 goal of a 55% cut in greenhouse gas emissions from 1990 levels.

Export powerhouse Germany accounts for around two percent of the worldwide emissions blamed for heating the Earth's atmosphere, melting ice caps, rising sea levels and intensifying violent weather events.

Ms Merkel, a scientist by profession, was once known as the "climate chancellor" as she pushed forward a green energy transition that vastly increased clean renewables such as wind and solar power.

Greta Thunberg attends a protest in Germany against energy giant RWE

However, many of those gains have been eroded by an increased reliance on dirty coal, in part to offset the phase-out by 2022 of nuclear power that the Chancellor decided after Japan's 2011 Fukushima disaster.

Her government this year announced a coal phase-out by 2038, but faces local opposition from mining regions, especially in the ex-communist east, where the far-right AfD party has capitalised on fears over job losses.

Car-obsessed Germany has also lagged badly behind in the transport sector, where state-coddled auto giants VW, Daimler and BMW have long focused on fuel-inefficient SUVs more than hybrid or zero-emission electric cars.

Mindful of the 800,000 jobs tied to the auto sector, Ms Merkel's government is also cautious that new environment taxes could set off the type of "yellow-vest" anti-government protests that have plagued neighbouring France.

But the young warn that delaying action is not an option, calling the threat existential with devastating consequences during their lifetimes.

"We are heading for a life-destroying crisis and so far nothing has happened," said Linus Steinmetz of the student movement.

"That's why we're raising the pressure - together we're strong."