Germany's climate change laws are insufficient and violate fundamental freedoms by putting the burden of curbing CO2 emissions on the young, its highest court has ruled.
It says the law fails to give enough detail on cutting CO2 emissions after current targets end in 2030.
"The provisions irreversibly offload major emission reduction burdens on to periods after 2030," it found.
The government will now have to revise the law by the end of the next year.
The decision comes a week after the EU unveiled ambitious new climate change targets.
Under the law, which was agreed between member states and the European Parliament, the bloc will cut carbon emissions by at least 55% by 2030, compared with 1990 levels.
What does the law say?
Like the EU legislation, Germany's domestic climate change law provides for a 55% reduction in greenhouse gases by 2030.
The 2019 law was agreed as part of Germany's response to the 2016 Paris climate deal, which aims to keep the global temperature rise well under 2C - and preferably to 1.5C - to prevent the worst effects of climate change.
But the German Constitutional Court said on Thursday that current measures "violate the freedoms of the complainants, some of whom are still very young" because they delay too much of the action needed to reach the Paris targets until after 2030.
"In order to achieve this, the reductions still required after 2030 will have to be achieved more urgently and at short notice," it said.
Should Germany use up most of its permitted CO2 emissions by this time, future generations could face a "serious loss of freedom".
"Virtually any freedom is potentially affected by these future emission reduction obligations, because almost all areas of human life are still associated with the emission of greenhouse gases and are therefore threatened by drastic restrictions after 2030," the court said.
How did Germans react?
Thursday's ruling partially upheld complaints brought by climate change activists - most of them young - and environmental groups between 2018 and 2020.
German climate activist Luisa Neubauer from the Fridays for Future movement and one of the plaintiffs in the case, described the decision as a "huge win for the climate movement".
"Today's inaction mustn't harm our freedom & rights in the future," she said.
One of the lawyers involved in the case, Felix Ekardt, hailed the "ground-breaking victory".
Following the announcement, German organisation Deutsche Umwelthilfe (DUH) tweeted a letter written by an 11-year-old girl (in German) in 2019, which had led to its own involvement in the case.
"I would like to take the government to court because the politicians aren't taking the impending climate catastrophe seriously enough, and I want people in 100 to 150 years to still know what snow is," the pupil wrote.
German Environment Minister Svenja Schulze also welcomed the decision, which she described as "a clear strengthening of climate protection".
"I would have liked to have included a further interim goal for the 2030s in the  law but at the time there was no majority for that," she said.
What are other countries doing?
Other countries have also focused on climate change in recent days, with Poland reaching a draft agreement with trade unions to close all of its coal mines by 2049 and organise severance payments for the tens of thousands of workers affected.
Last week, the US hosted a virtual climate summit of 40 global leaders, with President Joe Biden pledging to cut US carbon emissions by 50-52% below 2005 levels by the year 2030.
Meanwhile, the UK announced radical plans to cut carbon emissions by 78% by 2035, although environmentalists warn that the government has consistently failed to achieve previous targets set by its independent Climate Change Committee.