U.S. District Judge Emmet G. Sullivan’s handling of former National Security Adviser Michael Flynn’s sentencing hearing Tuesday on Flynn’s guilty plea to lying to the FBI was anything but exemplary. The judge – who has a well-deserved reputation as both tough and fair – made several fundamental errors right at the outset.

First, Sullivan suggested that Flynn might be guilty of treason. This reflects an abysmal ignorance of the governing case law. Nothing Flynn did comes even close to satisfying the strict definition of treason.

The U.S. Constitution states: “Treason against the United States shall consist only in levying War against them, or in adhering to their Enemies, giving them Aid and Comfort. No Person shall be convicted of Treason unless on the Testimony of two Witnesses to the same Overt Act, or on Confession in open Court.”

Flynn admitted he represented Turkey – America’s NATO ally – before he became a federal employee as President Trump’s national security adviser, but said he failed to register until later under the Foreign Agents Registration Act.

Special Counsel Robert Mueller did not charge Flynn for failing to register – let alone with the far more serious crime of treason.

But Sullivan blundered by accusing Flynn of having been an unregistered foreign agent while he was serving in the White House, thereby having “sold your country out.” This was flat out wrong, since Flynn stopped working for any foreign government before he became President Trump’s national security adviser when Trump took office on Jan. 20, 2017.

During a recess, in the sentencing hearing, Judge Sullivan’s law clerks obviously set him straight on the law and the facts and the judge walked back his erroneous statements. But these statements reflect a kind of abiding bias that might well result in reversible error if Flynn’s lawyers appeal a sentence he eventually receives from Sullivan.

It is obvious that Judge Sullivan regards Flynn as guilty of far more serious crimes than he pleaded to or was even charged with committing.

The judge delayed sentencing for Flynn – a retired Army lieutenant general – until next year and gave each side until March 13 to file a status report with the court.

I had a case much like this several years ago and the appellate court reversed the sentence and remanded it for resentencing before a different and unprejudiced judge. Walking back erroneous statements cannot unring the bell of a judge’s prejudice.

It is obvious that Judge Sullivan regards Flynn as guilty of far more serious crimes than he pleaded to or was even charged with committing.

Sullivan probably came into the courtroom before the recess with his mind made up about the sentence he intended to impose based on his erroneous views regarding treason and Flynn’s supposed role as an agent for a foreign government while serving in the White House. The judge may even have written out the sentence in advance, as many judges do.

Sullivan deliberately telegraphed his intention to impose a prison sentence in defiance of the joint recommendation of the Mueller and Flynn’s defense attorney, who agreed that Flynn should not serve any prison time.

The Constitution limits the role of federal judges to actual “cases and controversies,” and there was no controversy regarding the appropriate sentence of probation for Flynn.

To be sure, the courts have carved out an exception – erroneously in my view – to this constitutional restriction on the jurisdiction of judges when it comes to sentencing. But most judges abide by the spirit of the constitutional restriction by rarely, if ever, imposing their own view when the parties have agreed.

Not Judge Sullivan, who knows far less about the facts and the defendant than do the parties, as evidenced by his serious misstatements.

Now the sentencing has been postponed, giving members of Flynn’s legal team an opportunity to reconsider their strategy.

There were serious issues surrounding the circumstances of Flynn’s questioning by the FBI and of the guilty plea he submitted. But Flynn’s lawyers understandably declined to raise challenges on these issues, because they expected a sentence of probation for their client – for which Flynn needed to show remorse, not contentiousness.

But now that the judge has signaled his willingness to consider a prison sentence, Flynn has three options – none of them good.

Flynn’s first option is to ask the judge to throw out his questionable guilty plea – but it will be difficult to do so in light of his statement at the sentencing hearing that he accepts his guilty plea and knew he was doing wrong when he lied to the FBI.

Flynn’s second option is to cooperate even more, but there may not be much more he can say or do. If he admits he withheld some cooperation that would hurt him.

The former national security adviser’s third option – a nuclear one – would be to seek to recuse Judge Sullivan because of the judge’s prejudicial misstatements about treason and about Flynn being a foreign agent while working in the White House. But this, too, may backfire, because judges often punish defendants for “judge shopping”.

So the sentencing will go forward after a delay. In the meantime, President Trump has the power to pardon Flynn or commute his sentence, either now or after the sentence is imposed.

Flynn can’t count on such executive action. But he also can’t count on Judge Sullivan to do what both parties recommended.

Flynn shouldn’t have lied to the FBI. He has already paid a heavy price and will probably pay an even heavier one.