A federal appeals court panel on Tuesday questioned the government’s rationale for terminating a program that offered a reprieve from deportation to immigrants who came to the United States illegally as children, with one judge inquiring whether officials had yet considered re-justifying the decision to make it more legally sound.

The three-judge panel with the U.S. Court of Appeals for the 9th Circuit is the first appellate court to hear oral arguments on whether the Trump administration’s decision to end the Deferred Action for Childhood Arrivals program, commonly known as DACA, can pass legal muster.

The judges — two appointed by President Barack Obama and one by President Bill Clinton — asked skeptical questions of both sides, and it was difficult to determine how they might rule.

The judges inquired about whether the judiciary could rightly second-guess what the government characterizes as an exercise of prosecutorial discretion, and whether the government might — as one lower court judge suggested — consider providing more solid legal reasoning for coming to the decision it did. They also asked about whether the government might have violated the due-process rights of DACA recipients whose lives could be upended.

A federal judge in San Francisco — weighing bids to save DACA from the states of California, Maine, Maryland and Minnesota; California’s university system; and individual DACA recipients — had blocked the administration from ending the program, at least temporarily. The ruling was largely based on the judge’s conclusion that the decision to end it was arbitrary and based on flawed legal reasoning.

Justice Department attorney Hashim M. Mooppan argued that it was not and that federal judges should not be able to review what was essentially a “discretionary enforcement decision” of the Homeland Security secretary.

“It is the government’s position that DACA exceeds the scope of permissible, prosecutorial discretion,” Mooppan said.

Michael Mongan, an attorney for the state of California, countered that the Justice and Homeland Security departments “told the courts and they told the country that our hands are tied by the law” — reversing course after years of defending DACA — and that “they can’t turn around and say the courts are barred from reviewing that legal conclusion.”

“They’ve got to explain what they’re doing,” Mongan said. “They’ve got to show their homework.”

The 9th Circuit panel’s eventual ruling is unlikely to have any immediate, practical effect on the DACA program and its hundreds of thousands of recipients. That is because two other federal district court judges in the District and New York have also blocked the administration from winding down the program. Those cases run through different appellate circuits and would not be directly affected by the 9th Circuit’s decision.

To change the status quo, the administration would have to run the table or win at the Supreme Court, where — short of legislation or other government action — the case is likely to be decided.

The Justice Department is hopeful that the nation’s highest court might be friendlier. Last year, the court, which then had only eight justices, deadlocked in deciding the fate of a similar program. That program expanded DACA and implemented a new initiative commonly referred to as DAPA, shielding those with family ties to U.S. citizens or others lawfully in the country from deportation.

A federal judge in Texas had blocked the DAPA program after a lawsuit by that and other states. Texas and six other states in recent weeks sued to end the original program, and the case is before the same federal judge. His ruling could hasten the Supreme Court’s taking up the case if it conflicts with others around the country.

Judge Kim McLane Wardlaw pressed on that point, asking what the Justice Department would do if the Texas judge declared DACA unlawful — which might force the administration to either violate his order or those of the judges who say the program should be maintained.

“This is one of many reasons why nationwide injunctions are not appropriate for courts to issue,” Mooppan responded. “What we would do in that circumstance is something we’re still figuring out.”

Judge Jacqueline H. Nguyen noted that the federal judge in the District had given the government an out of sorts by providing the government time to offer more solid reasoning for the decision to wind down DACA, and asked whether it might take him up on it. Mooppan said officials had not yet made a decision but believed the legal reasoning for winding down DACA was sufficient.

Attorney General Jeff Sessions has said that the administration’s fear of lawsuits helped spur DACA’s end — especially what he said was “imminent litigation” from the state of Texas and others. Officials have said they thought it better to gradually bring the program to an end, rather than wait for a court to stop it abruptly.

Lawyer Mark Rosenbaum, who represents six DACA recipients suing to save the program, urged the judges to consider that his clients’ due-process rights could have been violated by the government’s “cruel bait-and-switch method” of convincing them to sign up for a program, only to suddenly withdraw it.

Judge John B. Owens hinted that he might be amenable to the argument, asking what the panel might do if it were to consider the states’ other argument a “loser” but agree that winding down DACA violated recipients’ due-process rights.

Leon Fresco, who was the deputy assistant attorney general for the Office of Immigration Litigation during the Obama administration and now works at Holland & Knight, said the 9th Circuit siding with the Trump administration would be a “massive victory” for the government, but even a loss would not mean DACA is destined to survive.

The program itself, Fresco said, was based on the principle that prosecutors had discretion on whether to pursue illegal immigration cases — meaning that just as Obama could implement the program, another president could presumably undo it.

“I have found that to be the argument that’s the toughest to understand, because that was the whole point of this, that these were prosecutorial discretion decisions,” Fresco said.