A federal judge on Tuesday told prosecutors they did not have to make public highly classified transcripts of Michael T. Flynn talking about sanctions with the Russian ambassador in December 2016.

The judge’s decision means that the exact words that Mr. Flynn, President Trump’s first national security adviser, and Sergey I. Kislyak, formerly Russia’s top diplomat in the United States, exchanged during the presidential transition will remain secret.

The men spoke shortly after the Obama administration placed sanctions on Russia for interfering in the 2016 presidential election. Mr. Flynn later denied to Trump administration officials and the F.B.I. that they discussed sanctions. The transcripts would have demonstrated the extent of Mr. Flynn’s lies.

The judge, Emmet G. Sullivan of the United States District Court for the District of Columbia, who is overseeing Mr. Flynn’s case, had previously ordered prosecutors to disclose the information by the end of last month.