Two appellate judges ordered a federal judge to drop the criminal case against President Donald Trump’s former national security adviser Michael Flynn, who earlier pleaded guilty to lying FBI.

Two of three judges for the Court of Appeals for the District of Columbia ordered trial federal judge Judge Emmet G. Sullivan to immediately drop the Flynn case on Wednesday. The decision came after a plea from Flynn’s lawyer, Sidney Powell, who asked the appeals court to order Judge Sullivan to drop the criminal case. Sullivan did not immediately grant the Justice Department’s motion. He had also appointed the former federal Judge John Gleeson to present him arguments for and against the case dismissal.

The order was highly unusual as Flynn pleaded guilty twice about lying to F.B.I. agents in the Russia investigation about his communication with the Russian ambassador to the United States in December 2016, weeks before Trump won the election.  Flynn later sought to withdraw the guilty plea.

Appeals court Judge Neomi Rao explained that appointing Judge Gleeson a friend of the court turned the case away from the public interest. Trump appointed Rao, a former White House official, to the appeals court last year.

She wrote that the case is “about whether, after the government has explained why a prosecution is no longer in the public interest, the district judge may prolong the prosecution by appointing an amicus, encouraging public participation, and probing the government’s motives.”

She added: “On that, both the Constitution and cases are clear: He may not.”

Trump, who said in March that he wanted to pardon Flynn, celebrated the court decision to drop his case, in a tweet.