Federal District Court Judge Emmet Sullivan made clear Friday that Michael Flynn, who served briefly as President Donald Trump's national security adviser, has a high hurdle to overcome in persuading the judge to let Flynn withdraw his guilty plea.

Flynn pleaded guilty two years ago, admitting he lied to the FBI about his conversations with Russia's ambassador to the U.S. during the Trump transition. A year ago, the government said he deserved credit for admitting his misconduct and cooperating with prosecutors in investigating Flynn's former business partner. But prosecutors said recently that he failed to live up to the bargain and no longer deserves leniency.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Flynn's lawyers have accused the FBI of misconduct in how it has handled his agreement. That culminated in a motion filed earlier this month seeking to withdraw his guilty plea, which has delayed his sentencing.

In a brief order Friday, Judge Sullivan said Flynn's lawyers should file legal briefs addressing whether the court should hold a hearing "where the parties would present all testimony and evidence concerning the issue of whether Mr. Flynn can show that there is good cause to set aside his guilty pleas."

Such a hearing, the judge said, might include "testimony from Mr. Flynn and other witnesses under oath, subject to cross-examination, to show any 'fair and just reason' for this court to grant his motion to withdraw."

The judge's order cited a 1995 ruling by the D.C. Court of Appeals that set a very high bar for withdrawing a plea. In that case, the appeals court said a defendant "must show either an error in the taking of his plea or some 'more substantial' reason he failed to press his case rather than plead guilty."

If a judge refuses to allow a defendant to withdraw a guilty plea, the appeals court said it would be "extremely reluctant" to overrule such a ruling unless a defendant can show that the judge clearly made a mistake. A defendant "has to shoulder an extremely heavy burden if he is ultimately to prevail."

Flynn's sentencing is now set for Feb. 27. Under federal guidelines, he could face zero to six months in jail, and federal prosecutors have said his sentence should be in that range. Flynn’s lawyers have urged the judge to sentence him to probation with no jail time.