Washington • A federal judge on Tuesday postponed the sentencing for Michael Flynn after he lambasted President Donald Trump’s former national security adviser for trying to undermine his own country and said he could not guarantee he would spare Flynn from prison.

The stunning development means that Flynn will have to be sentenced at a later date, when he can possibly convince a judge more thoroughly of how his cooperation has benefited law enforcement.

Flynn's attorneys asked for the delay after U.S. District Judge Emmet Sullivan accused Flynn of acting as "an unregistered agent of a foreign country, while serving as the national security adviser to the president of the United States" - an allegation he later walked back. Sullivan granted the request and asked for a status report in 90 days, though he said he was "not making any promises" that he would view the matter differently in three months.

After reviewing some of the allegations against Flynn, including that he worked to advance the interests of the Turkish government in the United States during the 2016 presidential campaign, the judge pointed to an American flag behind him in the courtroom and said heatedly, "Arguably, that undermines everything this flag over here stands for. Arguably you sold your country out.

"The court's going to consider that," the judge said. "I cannot assure you, if you proceed today, you will not receive a sentence of incarceration."

Sullivan also asked a prosecutor with the special counsel's office whether Flynn could be charged with "treason."

Flynn, standing straight and flanked by attorneys on either side, looked shaken, his jaw clenched. Sullivan declared a recess to let Flynn consider whether he wanted to proceed and let the judge impose a punishment, or to delay and cooperate more with the special counsel in hopes of leniency.

The exchange marked a stunning turn in the case. Both prosecutors and defense attorneys had urged that Flynn face no prison time for his crime of lying to the FBI, noting that he was an early cooperator in special counsel Robert Mueller’s investigation of Russian interference in the 2016 election and had provided information useful to several other ongoing probes.

But in their sentencing submission, Flynn’s attorneys suggested he might have been fooled into lying to the FBI because he had not been warned in advance that doing so is a crime. That prompted the judge to request more documents, and the special counsel’s office last week vigorously pushed back on the idea that Flynn was mistreated.

"The Court should reject the defendant's attempt to minimize the seriousness of those false statements to the FBI," prosecutors wrote. "Nothing about the way the interview was arranged or conducted caused the defendant to make false statements to the FBI."

Sullivan began the hearing by questioning Flynn about that, and the former national security adviser conceded he was aware lying to the FBI was a crime when he did so and declined to withdraw his guilty plea to the offense - a mea culpa that could rankle supporters who have suggested he was duped by law enforcement into committing a crime.

Sullivan reminded Flynn he could get into "more trouble" if he were to lie in court, then asked, "Were you not aware that lying to FBI investigators was a crime?"

"I was aware," Flynn said.

The judge asked if he wanted to postpone the sentencing, or reconsider his plea.

"I would like to proceed your honor," Flynn said.

"Because you are guilty of this offense?" the judge responded.

"Yes, your honor," Flynn said.

The judge similarly pressed Flynn's attorneys, who confirmed Flynn stood by his plea. Robert Kelner, one of the lawyers, said the statements in their sentencing submission were the responsibility of Flynn's legal team, not Flynn himself.

Flynn has been expected to make a personal plea for Sullivan to show him leniency, though the judge indicated early he was not inclined to give him the benefit of the doubt.

"I'm not hiding my disgust, my disdain for this criminal offense," Sullivan said.

"Could he be charged with treason?" Sullivan asked special counsel prosecutor Brandon Van Grack.

"It's such a serious question, I'm hesitant to answer it," Van Grack responded. He said later he had "no reason to believe that Mr. Flynn committed treason . . . and no concerns over issues related to treason."

The concession from Flynn is likely to disappoint supporters, who for months have advanced the notion that he was wronged. Reluctance to admit guilt, though, could have prompted the judge to tear up Flynn's plea, or reduce the benefit he might have gotten from cooperating. It remains unclear what will happen now.

Outside the court Tuesday, a small group of demonstrators carried signs that bore messages supportive of Flynn, such as "Stop the witchhunt" and "Flynn is Innocent!"

In a Tuesday morning tweet, Trump wished Flynn "good luck today in court."

"Will be interesting to see what he has to say, despite tremendous pressure being put on him, about Russian Collusion in our great and, obviously, highly successful political campaign," Trump wrote. "There was no Collusion!"

The judge noted in court Tuesday the gravity of Flynn's offense and the help he has provided to Mueller and others.

"This is a very serious offense - a high-ranking senior official of the government, making false statements to the Federal Bureau of Investigation while on the physical premises of the White House," Sullivan said, emphasizing every word. "The court will also consider [Flynn's] substantial assistance in several investigations."

Asked by Sullivan if Flynn is still cooperating with the government, special counsel prosecutor Van Grack answered, "It remains a possibility."

He said the government moved to sentence Flynn now because the "the vast majority" of his cooperation was complete.

Flynn pleaded guilty in Mueller's probe more than a year ago, admitting that he lied to the FBI about conversations with Sergey Kislyak, Russia's ambassador to the United States at the time. Flynn had talked with the diplomat in the weeks before Trump's inauguration about efforts to blunt Obama administration policy decisions - on sanctions against Russia and a U.N. resolution on Israel. On Monday, prosecutors revealed the FBI notes of the interview with Flynn - reinforcing the notion that he lied.

The filings show that Flynn was asked about Obama-era sanctions that were announced Dec. 29, 2016, as punishment for Russia's interference in the election, and that he insisted he had not discussed them with Kislyak. Flynn claimed he had not even known about the newly announced sanctions because he had been on vacation in the Dominican Republic, where he did not have access to television news and his government BlackBerry was not working.

In fact, Flynn had called a senior transition official at Trump's Florida resort, Mar-a-Lago, to talk about what he should say to Kislyak about the sanctions that had been announced, and he followed up later to report the upshot of the conversation with the ambassador, according to his plea agreement. People familiar with the case have said the official was Flynn's deputy, K.T. McFarland.

The lies - which prosecutors said Flynn repeated to Vice President Mike Pence and The Washington Post, among others - ultimately cost Flynn his job. Flynn said as a part of his plea that in talking to Kislyak, he was acting in consultation with senior Trump transition officials, including Trump's son-in-law, Jared Kushner. No evidence has publicly emerged, however, that they told him to lie to investigators.

Flynn also admitted in his plea deal that he had lied about his business dealings with the Turkish government. On Monday, prosecutors in the Eastern District of Virginia charged two of Flynn's associates with acting as agents of a foreign government and detailed how the trio had worked during the heart of Trump's campaign to persuade the United States to expel a rival of Turkish President Recep Tayyip Erdogan.

Van Grack said in court Tuesday that Flynn assisted - and could have been charged - in that case.

"The defendant provided substantial assistance to the attorneys in the Eastern District of Virginia in obtaining that charging document," Van Grack said.

The Washington Post’s John Wagner contributed to this report.