A retired judge urged a federal court on Wednesday not to allow the Justice Department to dismiss its criminal case against President Donald Trump’s former adviser Michael Flynn, citing evidence of a “gross abuse of prosecutorial power.”

The US district judge hearing the case, Emmet Sullivan, tapped John Gleeson last month to serve as a “friend of the court,” after the Justice Department abruptly asked the court to dismiss the criminal charge against Flynn, a retired Army lieutenant general.

The stunning move by the Justice Department followed a pressure campaign by Trump and his allies and came even though Flynn had twice pleaded guilty to lying to the FBI about conversations with former Russian Ambassador to the United States Sergey Kislyak.

“The Department of Justice has a solemn responsibility to prosecute this case — like every other case — without fear or favor,” Gleeson wrote. “It has abdicated that responsibility through a gross abuse of prosecutorial power, attempting to provide special treatment to a favored friend and political ally of the President of the United States.”

He said Sullivan should proceed with sentencing Flynn.

A Justice Department spokeswoman declined to comment beyond what the government has already argued in court filings.

Flynn was one of several former Trump aides charged under former Special Counsel Robert Mueller’s investigation that detailed Moscow’s interference in the 2016 US presidential election.

Gleeson said there was “ample evidence in the record that Flynn committed perjury,” or lied under oath.

He recommended that Sullivan take Flynn’s perjury into account when sentencing him for lying to the FBI, rather than commencing a follow-on prosecution.

Despite admitting twice under oath to lying to the FBI and agreeing to cooperate, Flynn later changed legal tactics and his attorneys now allege the FBI entrapped him.

The Justice Department now says the FBI investigation that led to the charge lacked an adequate legal basis and that Flynn’s statements, even if untrue, were not material.

“The reasons offered by the government are so irregular, and so obviously pretextual, that they are deficient,” Gleeson wrote in response. “They reveal an unconvincing effort to disguise as legitimate a decision to dismiss that is based solely on the fact that Flynn is a political ally of President Trump.”

Gleeson highlighted the conversations that Flynn had with Kislyak that led to the false-statement charge, and compared them against how Flynn portrayed them during his January 2017 FBI interview.

A transcript showed Flynn telling Kislyak he wanted to avoid a “tit for tat” over sanctions the United States imposed on Russia for its interference in the 2016 election.

Flynn has also asked an appeals court to force Sullivan to accept the request to drop the case. Arguments in that case are set for Friday.

“This Court must stop him (Sullivan) before he further jeopardizes the legitimacy of the federal judiciary,” Flynn told the appeals court in a court filing on Wednesday.

Sullivan has said he cannot serve as a “rubber stamp” and must carefully review the facts in this “unprecedented” request.