Michael Flynn’s sentencing judge Wednesday asked a former federal judge to oppose the Justice Department’s request to dismiss the former Trump national security adviser’s guilty plea and examine whether Flynn may have committed perjury.

The judge requested a nonbinding recommendation on whether Flynn should face a criminal contempt hearing for pleading guilty to a crime of which he now claims to be innocent: lying to the FBI in a January 2017 interview about his contacts with Russia’s ambassador to the United States.

U.S. District Judge Emmet G. Sullivan’s appointment of retired New York federal judge John Gleeson comes one day after Sullivan put on hold the Justice Department’s bid to drop charges against Flynn, saying he expects independent groups and legal experts to argue against the move.

The unusual move by the court plunges the Flynn case even deeper into uncharted legal waters, in which the Justice Department has taken a posture more common to defense lawyers by saying that the former three-star general should never have been interviewed in an investigation and therefore his lies were immaterial. The case also presents novel legal twists as the judge has appointed a former judge to determine whether other crimes occurred and the president’s supporters demand the immediate dismissal of the entire case.

Meanwhile, the department has come under intense fire from those inside its ranks and thousands of alumni who say the institution is being politicized and bent to the will of President Trump. Sullivan’s order threatens to unearth even more, potentially unflattering details of how the department’s political leaders came to decide they should walk away from a case involving Trump’s ally.

As a federal prosecutor in Brooklyn, Gleeson is best known for putting the late mob boss John Gotti behind bars. As a federal judge from 1994 to 2016 appointed by Bill Clinton, Gleeson was not shy about criticizing the Justice Department, and one lawyer who practiced before him called him “a purist.” In a 2013 drug case, he sharply criticized the department’s policies in trying to extract heavy prison sentences as part of guilty pleas, which he called “unsound and brutally unfair” and “the sentencing equivalent of a two-by-four to the forehead.”

Gleeson also chaired the federal judiciary’s Committee on Defender Services, has written a widely used treatise on federal criminal practice in the New York-based, 2nd Judicial Circuit and teaches complex federal investigations and sentencing at Harvard University and New York University.

In a commentary article on Monday, Gleeson observed the Justice Department has made conflicting statements to the court, which has “the authority, the tools and the obligation to assess the credibility of the department’s stated reasons for abruptly reversing course.”

“The law provides that the court — not the executive branch — decides whether an indictment may be dismissed. The responsible exercise of that authority is particularly important here, where a defendant’s plea of guilty has already been accepted. Government motions to dismiss at this stage are virtually unheard of,” Gleeson wrote.

A Justice Department spokeswoman declined to comment. Flynn’s defense did not immediately respond to a request for comment.

Former federal prosecutor Randall Eliason said that although the order is not a definitive sign of what Sullivan will ultimately do with Flynn’s case, it is the clearest indication yet that he is not willing to go along easily with the Justice Department’s request.

“It’s clear that he’s not simply going to take the government’s motion at face value, and he wants to probe the reasons for this reversal after two years, and I think that’s completely understandable,” Eliason said.

Eliason said Sullivan’s contemplation of holding Flynn in contempt for perjury exposed what has long been a flaw in Flynn arguing that his plea should be undone. Flynn admitted in court under oath three times before two different judges that he lied to the FBI.

“They can’t have it both ways,” Eliason said. “If they’re going to say now he didn’t lie to the FBI, then he lied to the judge. … But presumably [U.S. Attorney General William P.] Barr’s DOJ is not going to prosecute him for perjury, so another option is the judge could hold him in contempt for lying to the judge.”

Legal experts said it is both extremely rare for a federal court to seek an outside counsel to oppose a joint government and defense motion, but also for such a motion to come after a defendant has entered a plea to a court.

In 2009, Sullivan appointed a special prosecutor to investigate whether government lawyers who won a short-lived trial conviction in a campaign finance case against former senator Ted Stevens (R-Alaska) should be prosecuted for criminal conduct. Sullivan’s appointment in that case came under a statute that gives judges such authority in criminal contempt cases against the government.

Sullivan cited two other cases as precedent for Wednesday’s order. In one, the U.S. Court of Appeals for the District of Columbia Circuit in 2016 shut down efforts by judges to supervise deferred prosecution agreements, in which companies agree to penalties and fines but avoid having to plead guilty. The judges had appointed counsel to argue against the overlapping positions taken by corporate defendants and the government.

In the other, the same court in 2008 blocked an attempt by Falun Gong practitioners to sue Chinese government entities for harassment in the United States. An outside party had argued against the Falun Gong because China claims immunity from civil suits and did not respond to the case.

Aitan Goelman, a lawyer for Peter Strzok — a fired FBI agent who interviewed Flynn and whose conduct in the case has been attacked by the defense in its motions — said it was “completely appropriate … to appoint a widely respected former judge like John Gleeson to represent the position that the Department of Justice abandoned in a blatantly politically move.”

Goelman called it “a bit rich” for Trump and allies to criticize this move, when Barr has shown repeated willingness “to throw his own … department under the bus and handpick” U.S. prosecutors to undermine the work of the Russia investigation.