Although Judge Sullivan has a reputation for being hard on government misconduct, he found no fault with the conduct of the F.B.I. or prosecutors. He said Mr. Flynn deceived not only F.B.I. agents, but also senior White House officials, who then repeated his lies to the American public.

“This is a very serious offense,” he said. “This case is in a category by itself.”

At one point, he asked Brandon L. Van Grack, the lead prosecutor, whether Mr. Flynn was guilty of treason. The question clearly surprised a phalanx of lawyers on Mr. Mueller’s team who were present for the proceedings. Mr. Van Grack at first hesitated to answer, then later said the government had no evidence of treason, and the judge dropped the point.

Some of Judge Sullivan’s sharpest rebukes involved Mr. Flynn’s lies about his lobbying work for the Turkish government. Wrongly asserting that Mr. Flynn continued to work as an unregistered foreign agent during his short tenure as national security adviser, the judge gestured to the American flag at his side and declared: “I mean, arguably, that undermines everything this flag over here stands for. Arguably, you sold your country out.”

For Mr. Flynn, who once led supporters of Mr. Trump’s campaign in chants of “lock her up” against Hillary Clinton, more uncertainty lies ahead. Although prosecutors said they had gleaned almost all they could from him, Mr. Kelner told the judge that Mr. Flynn wanted to postpone his sentencing to put himself in the best position “to eke out the last modicum of cooperation.”

Under his plea deal, Mr. Flynn met with investigators and prosecutors for the special counsel’s office 19 times. In doing so, he became an early cooperator in an investigation that has spun off criminal cases now in the hands of other federal prosecutors.

The special counsel’s office is investigating whether Mr. Trump obstructed justice, including by asking James B. Comey, the F.B.I. director at the time, to end the investigation into Mr. Flynn in early 2017. It is unclear whether Mr. Flynn knew about the president’s reported attempt to intervene on his behalf, or whether he has offered any insights on that front.

Prosecutors acknowledged that Mr. Flynn had helped the government secure an indictment in Northern Virginia against two of his former business associates for violating foreign lobbying rules. Prosecutors said the two men conspired with Turkey in 2016 to pressure the United States to expel a rival of President Recep Tayyip Erdogan.