Former Trump national security adviser Michael Flynn asked a federal appeals court late Tuesday for an order directing the judge handling his case to dismiss it, another surprise twist in his legal saga.

Flynn’s lawyers asked the Court of Appeals for the District of Columbia to order Federal District Court Judge Emmet Sullivan to grant the Justice Department’s motion, filed earlier this month, to dismiss the case. Instead of simply doing as the government asked, Sullivan appointed a retired federal judge to examine the government’s justification for dropping the case and to look at whether Flynn should separately be found in contempt of court for his earlier guilty plea, which he has since asked to withdraw.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings.

Once the government seeks to abandon a prosecution, his lawyers argued in their appeals court filing, the judge has virtually no choice but to accept that decision and “has no authority to adopt the role of the prosecutor.” Sullivan’s efforts to appoint the judge as a friend of court shows “a disturbing lack of appreciation of the court’s limited role.”

The man Sullivan appointed, John Gleeson, said Tuesday that he intended to respond to the judge’s order by June 10. Sullivan ordered the Justice Department and Flynn’s lawyers to reply to that filing by June 17 and scheduled oral arguments in his courtroom for July 16. He also invited other friend of court submissions from individuals or groups not directly involved in the case.

Flynn’s lawyers told the appeals court that the judge had no authority to invite outside parties to weigh in. It was unclear Tuesday how Flynn’s appeal would affect that schedule.

These were the latest in an apparently unprecedented series of developments in Flynn’s case. After pleading guilty in two separate hearings, he fired his lawyers, brought in new ones, and asked to withdraw his guilty pleas. The judge has yet to rule on that request or to set a final date for sentencing.

In early May, the Justice Department abruptly notified the judge that it would no longer prosecute the case, having determined that even if Flynn lied to FBI agents in early 2017 about his phone calls with Russia’s ambassador to the U.S., his lies were not “material” to any investigation and did not, therefore, violate the false statement law at the heart of his case.

Instead of granting the Justice Department’s motion, Sullivan appointed Gleeson and invited others to submit their views about the government’s decision.

There is no deadline for the appeals court to act on Flynn’s latest move to have his case thrown out.