A U.S. judge is ordering the most sensational court records to remain sealed in the now-abandoned lawsuit over leaks in the investigation that led to the resignation of former CIA director David Petraeus.

The files include transcripts of sworn interviews with senior Obama administration officials about the sex scandal and its fallout.

U.S. District Judge Amy Berman Jackson late Thursday accepted government objections to keep nearly all the court files private, citing what she said were compelling confidentiality, privacy and law enforcement interests.

The former CIA director resigned in November 2012 and pleaded guilty to one misdemeanor charge of mishandling classified information relating to documents he had provided to his biographer, with whom he was having an affair.