On climate change, President Trump’s most dangerous foe could prove to be a bunch of kids.

The Trump administration tried and seemingly failed last month to get a climate lawsuit — filed on behalf of nearly two dozen teens — tossed out of federal court, paving the way for an unprecedented environmental trial in which the plaintiffs will argue the government has shirked its constitutional responsibility to protect the next generation of Americans from global warming.

The potential courtroom showdown, which a Justice Department litigator has said would be “trial of the century” if it’s allowed to go forward, would be as far-reaching in scope as any in recent history, when it comes to climate change and the government’s obligation to address it. Attorneys for the plaintiffs say they’re prepared to mount a sweeping indictment of the federal government and its actions over a period of decades.

The landmark case would involve proving in court that climate change is real and that humanity is driving it, and that the government, through both negligence and policies that deliberately favor fossil fuels over clean energy, has failed to do anything about it.

“The failure of the government to act and the government’s actions in enabling that increase [in greenhouse gas emissions] will be the subject of the first aspect of the case — primarily what we would call, ‘What did the government know and when did it know it, and why did it continue to act to further endanger these kids?’” said Philip Gregory, co-lead counsel for the plaintiffs and a partner with the California law firm Cotchett, Pitre & McCarthy.

“The next aspect will be putting the science on trial,” he continued. “What does science say about … our current situation in the United States regarding the climate, and are there steps that can be taken to dramatically reduce the ongoing problems — steps taken by the federal government?”

Lastly, he said he and his team will prove that the government’s course has directly endangered the 21 plaintiffs, all of whom were minors when the suit was first filed against the Obama administration in 2015.

Since President Trump came to power, his Justice Department has fought hard to get the case tossed out of court. The suit now names Mr. Trump, all Cabinet secretaries, several agency chiefs and other top administration officials as defendants.

A federal judge in Oregon last year said the case could go forward, setting an initial trial date for February. Government lawyers were granted a stay, and in December argued before a federal appeals court in San Francisco that allowing the trial to go forward would set a dangerous precedent.

“According to the plaintiffs’ complaint, virtually every U.S. citizen has the right to sue virtually any government agency,” said Justice Department lawyer Eric Grant during the appeals court arguments, adding that a “constitutional confrontation” within the government over how to approach climate change would be the natural result of the trial.

In essence, critics argue the plaintiffs are asking federal courts to set environmental policy — a job that should be left to the administration and to Congress. Some specialists say that even if a court agrees the government has violated the teens’ constitutional rights to life and liberty by failing to address global warming, it’s unclear how a court could fix the problem.

“The challenge for the plaintiffs is that they have brought a very amorphous case. They could lose,” said Christine Tezak, an analyst with ClearView Energy Partners, a Washington-based energy research company. “What is your relief here and how does the court grant it?”

While the plaintiffs point to several specific government actions — including federal approval of a liquefied natural gas export terminal in Oregon, where the case was filed — that they say bolster their case, Mr. Gregory said they’ll expect to court to take a broader view.

He said the plaintiffs don’t expect the court to step in and write specific environmental laws, but rather to establish standards for greenhouse gas emissions that the government, through the White House and Congress, can then use as a blueprint to write law.

“We want the trial court to establish a baseline — this is where we are, and this is how the federal government either is contributing to the problem or failing to address the problem,” he said.

It’s unclear when the San Francisco appeals court will hand down its decision, though the judges seemed somewhat hostile to the government’s position, leading most observers to believe the case ultimately will reach trial. It’s a virtual certainty that the initial February start date for the trial will be pushed back.

Lawsuits over the government’s environmental policies are hardly new, but with youth plaintiffs taking the lead, this case seems to have given activists and supporters of more aggressive climate policies their best chance to date to gain real concessions from the federal government.

“I believe that the momentum is on our side and it’s time for climate science to have its day in court,” said Nathan Baring, 17, of Fairbanks, Alaska, one of the plaintiffs in the case.