A federal appeals court in Washington expressed reluctance Friday to order a judge to immediately dismiss the criminal case against President Trump’s former national security adviser Michael Flynn, suggesting it will allow the judge to question whether the Justice Department’s decision to drop the prosecution is “in the public interest.”

Flynn, joined by the Justice Department, wants the appeals court to force U.S. District Judge Emmet G. Sullivan to quickly close the matter and put a stop to the judge’s examination of the retired three-star general’s politically charged case.

But Judges Karen Henderson and Robert Wilkins of the U.S. Court of Appeals for the D.C. Circuit seemed skeptical of Flynn’s argument that Sullivan cannot review the Justice Department’s abandonment last month of the long-running prosecution. Flynn pleaded guilty to lying to federal agents about his pre-inauguration contacts with Russia’s ambassador.

“Courts have said he’s not a ‘mere rubber stamp,’ ” Henderson said of Sullivan’s independent judicial authority. “There’s nothing wrong with him holding a hearing; there’s no authority I know of that says he can’t hold a hearing.”

Wilkins agreed, citing past cases in which the Supreme Court upheld the power of judges “to perform an independent evaluation” of the government’s action.

“You’re saying the Supreme Court got it wrong?” he asked Flynn’s lawyer Sidney Powell.

“No,” Powell said, but in this case, Flynn and the Justice Department are on the same side.

“The government has quit, and it’s time to leave the field,” Powell said, adding that “the toll it takes on a defendant to go through this is absolutely enormous.”

Flynn was the highest-ranking Trump adviser convicted in special counsel Robert S. Mueller III’s investigation of Russian interference in the 2016 election. Flynn admitted lying before two different judges and told Sullivan at a 2018 hearing that no one had coerced him to admit his guilt and that he had no intention of taking back his plea.

The appeals court hearing Friday came two days after a former judge who Sullivan appointed to argue against the Justice Department characterized its plan to dismiss the case as a “gross abuse of prosecutorial power.”

The highly unusual parallel proceedings raise novel questions about the scope of judicial power to check the Trump administration and whether a judge can sentence a defendant the government no longer wants to prosecute.

Sullivan refused to sign off last month on the Justice Department’s request to withdraw the charges against Flynn and instead appointed former New York federal judge John Gleeson to argue against the department’s position to help him decide how to proceed. Gleeson issued a stinging rebuke in a brief filed Wednesday, writing that the “government has engaged in highly irregular conduct to benefit a political ally of the President.”

Sullivan scheduled a July 16 hearing on the Justice Department’s move for dismissal. But Flynn took the rare step of asking the appeals court to get involved midstream to force Sullivan’s hand and accused the judge of bias. Solicitor General Noel Francisco joined Flynn in arguing that the judge has no power to second-guess the government’s prosecution decisions and said it would be unconstitutional for the court to refuse to dismiss when the defendant and the prosecution are on the same side.

After the appeals court agreed to review Sullivan’s actions, the judge hired a high-profile trial lawyer, Beth Wilkinson, to explain the judge’s reasons for investigating whether dismissing the case is legally appropriate and in the public interest.

Henderson and Wilkins are former District Court judges and seemed wary Friday of cutting short Sullivan’s process before he has made a decision. Henderson was nominated by former president George H. W. Bush and Wilkins by former president Barack Obama.

The third judge on the panel, Neomi Rao, is a nominee of President Trump who previously worked in his administration.

Rao had the most questions for Sullivan’s lawyer and expressed concern about the judiciary encroaching on the role of the prosecutor. She asked Wilkinson whether Sullivan’s appointment of Gleeson was “creating a controversy where there isn’t one.”

Wilkinson said the judge has the responsibility to question the government about its reversal.

“Judge Sullivan isn’t acting as a prosecutor, nor has he made up his mind,” Wilkinson said. There is no justification for the appeals court to “enter the fray,” she said.

Henderson agreed. Sullivan “may have chosen an intemperate” advocate in Gleeson, but that doesn’t mean he won’t ultimately grant the government’s request to dismiss the case against Flynn.

“We have Judge Sullivan, who’s an old hand. He’s an excellent trial judge. He may say — to himself at least — you know, I asked for advice. I’m ignoring it.”

Wilkins pressed the government with a hypothetical torn from the news: Could a court review a decision to dismiss a police brutality case against a white officer who pleaded guilty to using excessive force against a black victim?

The government does not have to state its reasons for dropping a case, answered Principal Deputy Solicitor General Jeffrey B. Wall, who noted there are other avenues for pursuing unconstitutional race-based decisions.

In the Flynn case, he said, the government fully explained its rationale for wanting to end the prosecution. Wall urged the court to block Sullivan’s review and said allowing a July hearing to go forward will create a “political spectacle.” He argued it would pull the judiciary into a fight over Gleeson’s “almost polemic” claims that “the president and the attorney general have engaged in grave misconduct,” and subject the Justice Department to intrusive questions.

“It’s not up to courts to probe whether the government has pure or impure motives. That’s up to the political and public arena,” Wall said.

Before the Justice Department’s reversal in May, the government withdrew a request for leniency and said it no longer sought a sentence at the “low-end” of the zero- to six-month range for Flynn. Instead of proceeding to sentencing, Attorney General William P. Barr ordered a review of Flynn’s case, which found the FBI had no valid basis to question Flynn, so any lies he told were irrelevant to any crime.

In setting up a process to review the department’s actions, Sullivan also asked Gleeson — a former mob prosecutor — to examine whether Flynn may have committed perjury while pleading guilty to a crime that he and the Justice Department now say is no longer a crime. Gleeson advised Sullivan in his filing this week not to impose contempt of court penalties on Flynn but to continue to the sentencing phase of the case.

Prosecutors have broad authority to make charging decisions, but federal rules also require prosecutors to get permission from the presiding judge to formally dismiss charges. Legal experts and retired judges disagree about the scope of Sullivan’s authority, offering different interpretations of a 2016 D.C. Circuit opinion that noted the judiciary generally lacks authority to “second-guess” charging decisions.

Sullivan’s position has drawn support in court filings from outside groups including a nonpartisan organization of former state and federal officials and a group of two dozen former federal judges appointed by presidents from both parties.

On the other side, Republican members of Congress and a group of prominent federal lawyers, including former independent counsel Kenneth W. Starr, said there is no role for the judge to play when the government and the defendant are in agreement.