Germany will have to improve its emissions targets from 2031 following a complaint by a coalition of climate activists, including Fridays for Future.
Germany's Constitutional Court ruled Thursday that the country's 2019 climate protection act is in part unconstitutional.
"The regulations irreversibly postpone high emission reduction burdens until periods after 2030," the court said.
It added that the law does not explain in enough detail how greenhouse gas emissions are to be reduced after 2031.
The judges gave the legislature until the end of next year to draw up clearer reduction targets for greenhouse gas emissions for the period after 2030.
The complaint was filed by a group of nine mostly young people. They are supported by several environmental associations, including Friends of the Earth Germany (BUND) and Fridays for Future.
They have criticized the law, saying it does not go far enough to sufficiently reduce greenhouse gas emissions and limit climate change.
They argue that because the law will not limit climate change, it violates their fundamental right to a humane future.
The court has now obligated the legislature to find a balance between freedom for all and burdens faced by some.
"Older people, at least those who are concerned about the well-being of their children and children's children, should rejoice over this ruling," Protestant theologian and former chair of the German Ethics Council, Peter Dabrock, told DW.
"The verdict sends a very strong signal," he added, and quoted the philosopher Immanuel Kant: "The freedom of the individual ends where the freedom of others begins." That principle is now getting a cross-generational perspective, he said.
"As a constitutional court ruling, this is as surprising as it is overdue," the ethics expert emphasized.
"The challenged provisions do violate the freedoms of the complainants, some of whom are still very young," the court said in a statement.
"Virtually every 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 thus threatened by drastic restrictions after 2030," the statement said.
German Minister for Economic Affairs and Energy Peter Altmaier responded to the ruling, saying it was both "big and meaningful." He added it was "epochal" for climate protection and the rights of young people as well as ensuring planning security for the economy.
He added that he was "pleased" that the court had implemented what he called the "most important" requirement of his 2020 climate initiative that ensures the reduction targets up to 2050 are "broken down into concrete reduction targets for each individual year between 2022 and 2050."
German Finance Minister Olaf Scholz said he and Environment Minister Svenja Schulze, who are both from the Social Democrats, the junior coalition partner in the federal government, had "resolved to very quickly prepare a draft bill to advise the federal government."
He said the aim is to amend the Climate Protection Act so that it complies with the requirements of the Federal Constitutional Court. He added that he expects the bill to receive the approval of the entire federal government.
"Action really needs to be taken now, and I'm ready to do that," Scholz said.
He accused Altmaier, a member of Chancellor Angela Merkel's Christian Democratic Union, of "talking about big climate goals but then putting on the breaks instead of taking any real action."
"It's an incomprehensibly big day for many people," said Luisa Neubauer from Germany's Fridays for Futures, who was part of the group that filed the complaint.
In a tweet, she added: "This is huge. Climate protection isn't nice-to-have, climate protection is a fundamental right."
Legal representative Felix Ekardt, said the court ruling had delivered the German government a "slap in the face," while lawyer Remo Klinger called it a milestone.
Plaintiff Sophie Backsen said, "We are super happy and relieved." Effective climate protection must be implemented now and not in 10 years when it is too late, she said.
Annalena Baerbock, confirmed by the Green Party as their candidate in the race to succeed Merkel as chancellor this year, called the decision "historic."
Germany's climate protection act was approved by the government in 2019.
Under the act, Germany is obliged to cut greenhouse gas emissions by 55% by 2030, compared to 1990 levels.
It also sets out yearly upper limits for greenhouse gases across various sectors such as energy, transport, buildings and agriculture.
If these individual targets are missed, an obligation to make improvements takes effect.