A group of young Americans suing the federal government to demand increased efforts on climate change won a notable battle Thursday, as a federal court rejected the government’s request to dismiss the case.

The ruling paves the way for the 21 plaintiffs—who range in age from 9 to 20—to take their case to trial in federal court. A ruling in their favor could be a landmark decision on climate change, though it would almost certainly be appealed to a Supreme Court that is set to become more conservative in the wake of Donald Trump’s win.

“We are standing here to fight and protect everything that we love—from our land to our waters to the mountains to the rivers and forests,” Xiuhtezcatl Martinez, a 16-year-old plaintiff in the case told supporters after a hearing in Eugene, Ore. this fall. “This is the moment where we decide what kind of legacy we are going to leave behind for future generations.”

The case rests on the legal argument that climate change threatens the plaintiffs’ fundamental constitutional right to life and liberty. Julia Olson, a lawyer for the plaintiffs and executive director of Our Children’s Trust, argued in court that the federal government has understood the threat of climate change for decades and knowingly put the lives of future generations in danger. The current measures in place to reduce greenhouse gas emissions are insufficient and not aligned with current science, she argued.

Read More: Donald Trump’s Victory Could Mean Disaster for the Planet

The lawsuit awkwardly puts President Obama’s Justice Department in a position arguing that the children do not have standing to sue—even though Obama himself has made climate action a priority. Sean Duffy, a lawyer for the Justice Department, acknowledged in a September hearing that climate change poses an urgent threat but dismissed the idea that individual citizens could sue the federal government over the issue. The federal government has no means to address the complaint, Duffy argued. Quin Sorenson, a lawyer representing industry interests including the American Petroleum Institute, supported that argument and added others.

But in the hearing Judge Ann Aiken appeared not just sympathetic to the children—most of whom were seated in the front of the courtroom—but also downright hostile toward the challengers. Aiken seemed to suggest that the court could play a role bringing the federal government to the table with environmental activists to negotiate an agreement.

“I would think the government would want the help of the courts to push the good work it’s doing,” she told Duffy. “There is so much common ground.”

Read More: What to Know About the Dakota Access Pipeline Protests

Of course, that common ground will likely evaporate as soon as Trump takes office in January. Trump repeatedly rejected the science of man-made climate change as a candidate and promised to undo many existing regulations. A lawsuit forcing policymakers to the table to take action on climate change would be a game-changing—if unlikely—victory for climate change activists at an otherwise dark moment.

This week’s victory is only a preliminary step forward for the novel lawsuit. The case now faces an actual trial and whatever decision emerges will inevitably be appealed, perhaps as far as the U.S. Supreme Court. The Court ruled in Massachusetts v. Environmental Protection Agency that the EPA needs to regulate carbon dioxide emissions from vehicles. But the Court has changed since then and will continue to change with Trump in office.

Get The Brief. Sign up to receive the top stories you need to know right now. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Justin Worland at justin.worland@time.com.