(Reuters) - A U.S. federal appeals court on Friday threw out a lawsuit by children and young adults who claimed they had a constitutional right to be protected from climate change, in a major setback to efforts to spur the U.S. government to address the issue.

In a 2-1 decision, the 9th U.S. Circuit Court of Appeals said the plaintiffs, who were between the ages of 8 and 19 when the lawsuit began in 2015, lacked legal standing to sue the United States.

Circuit Judge Andrew Hurwitz said the majority reached its conclusion “reluctantly,” given “compelling” evidence the government had long promoted fossil fuels despite knowing they could cause catastrophic climate change, and that failing to change policies could hasten an “environmental apocalypse.”

Our Children’s Trust, an Oregon-based non-profit behind the lawsuit, said in a statement that it would seek an 11-judge panel of the court to review the decision. The ruling had “catastrophic implications,” said Julia Olson, the group’s executive director.

A Department of Justice spokesman said the government was pleased with the outcome.

The 21 children and young adults had accused federal officials and oil industry executives of violating their due process right to a “climate system capable of sustaining human life,” by knowing for decades that carbon pollution poisons the environment but doing nothing about it.

The government argued that neither U.S. law or history supported the young people’s claim of a fundamental right to a “livable climate.” It also called the lawsuit an unconstitutional attempt to control the entire country’s climate and energy policy through a single court.

Hurwitz said the case left “little basis for denying that climate change is occurring at an increasingly rapid pace,” but that addressing it required “complex policy decisions entrusted, for better or worse, to the wisdom and discretion” of the White House and Congress.

“That the other branches may have abdicated their responsibility to remediate the problem does not confer on Article III courts, no matter how well-intentioned, the ability to step into their shoes,” he wrote.

The dissenting judge, U.S. District Judge Josephine Staton, said the Constitution did not “condone the Nation’s willful destruction” through climate change, likening government inaction to shutting down all defenses to an asteroid barreling toward Earth.

“No case can singlehandedly prevent the catastrophic effects of climate change predicted by the government and scientists,” she wrote. “The mere fact that this suit cannot alone halt climate change does not mean that it presents no claim suitable for judicial resolution.”

Dan Farber, a professor of law at the University of California, Berkeley, said the ruling closed the door on federal litigation seeking “courts to take bold action on climate change on their own.”

The judges on the panel were all appointed by President Barack Obama, a Democrat. U.S. District Judge Ann Aiken in Eugene, Oregon, had allowed the case to go forward.