(CNN) Special counsel Robert Mueller's prosecutors didn't want former FBI Director James Comey's memos released because they feared that President Donald Trump and other witnesses could change their stories after reading Comey's version of events, according to an argument they made in a January 2018 sealed court hearing.

A court order on Tuesday forced the Justice Department to provide a transcript of the hearing to CNN as part of a lawsuit over access to the Comey memos.

The Justice Department implored a federal judge to keep the memos under seal after CNN and other news organizations asked for their release. Mueller's plea to keep the memos under seal coincided with negotiations with Trump's legal team over a potential interview with the President at Camp David, planned for the days following the court hearing and which ultimately fell through. At the time of the late January hearing, several other witnesses to the Comey developments had already spoken to Mueller.

"Special Counsel is attempting to determine the facts that transpired in and surrounding those meetings," Mueller prosecutor Michael Dreeben said at the time, regarding meetings when Trump asked Comey for his loyalty and to end an investigation into his then-national security adviser Michael Flynn.

"In any investigation of this kind, the recollections of one witness, if disclosed to another potential witness, have the potential to influencing, advertently or inadvertently, the recollections of that witness," Dreeben said during the sealed court hearing.

Shortly after the meetings with Comey, Trump and the White House had publicly contradicted the FBI director's story, saying the President denied asking him about "letting Flynn go." Comey told his version of the story first during congressional testimony in spring 2017. Dreeben described how the Comey memos were essential evidence in the investigation and included far more detail about the meetings than what the former FBI director had said publicly in testimony.

Dreeben also tells the judge, according to the transcript, that Mueller's office was primarily concerned with Trump's behavior in the obstruction of justice investigation.

"In this instance, a person whose conduct is within the scope of the investigation is the President of the United States," Dreeben said in court.

Dreeben also told the judge about how the FBI had opened the obstruction investigation before Mueller's appointment.

"A witness who knows that a contemporaneous record was made of particular statements is aware that the reliability of that account is enhanced merely by virtue of the fact that it was recorded, and an individual who is seeking to shape or mold his own statements around those of others thereby acquires an advantage in doing so that he would not otherwise have," Dreeben added. "The more that other witnesses are aware of the details of what is in the memoranda and is not in the memoranda, the greater the risk that they're providing information that will assist the Special Counsel in completing the investigation and getting to the truth would be frustrated or impeded."

In his final report, Mueller collected other witness statements from Flynn; Trump's then-chief of staff, Reince Priebus, then-acting Attorney General Sally Yates, Trump's adviser, Stephen Miller and others in the administration.

Trump did not sit for an interview with the special counsel's office -- like hundreds of others had for Mueller -- and did not answer the special counsel's questions in writing related to the President's potentially obstructive acts. Trump and his legal team answered Mueller's questions in writing only about the other half of the special counsel's investigation, regarding possible conspiracy between the Russian government and the Trump campaign in 2016. Mueller found no conspiracy involving the campaign.

Other Justice Department attorneys attended the secret court hearing with Dreeben, according to the record released Tuesday, including two other prosecutors from the special counsel's office.

In January 2018, CNN and other media organizations were fighting for access to the Comey memos under the Freedom of Information Act. It wasn't revealed until later that Dreeben or anyone from the special counsel's office had taken the unusual step of speaking to the judge in person to keep the records confidential.

Redacted versions of the Comey memos became public in April 2018 after Congress received copies of them.

Mueller, in his final report on his investigation, wrote that he had "substantial evidence" to corroborate Comey's version of what happened. Mueller found that the President took steps to impede the ongoing investigation and was motivated to stop it because of his personal concern over how it could reflect on his 2016 electoral win.

Mueller did not make a prosecutorial judgment on the President's actions. Instead, Attorney General William Barr and Deputy Attorney General Rod Rosenstein reviewed the evidence, then decided not to prosecute Trump for obstruction of justice.