The special counsel’s office sought to keep secret the memos written by former FBI director James Comey in an attempt to stop those under investigation — such as Donald Trump — from tailoring their stories to line up with Mr Comey’s accounts, according to a court transcript made public on Tuesday.

Lawyers for the special counsel, Robert Mueller, made their arguments in a closed-door hearing in January 2018 before a federal judge, who was overseeing a lawsuit to have memos Mr Comey wrote about his interactions with the president released to the public.

News organisations had sued the Justice Department over access to the memos, but the case became moot when Congress made them public three months later. The judge ordered a transcript of the hearing to be released on Tuesday.

The transcript provides a window into the status of the special counsel’s investigation eight months after Mr Mueller began examining whether Mr Trump obstructed justice, among other issues. At the hearing, one of Mr Mueller’s top lawyers, Michael Dreeben, tried to illustrate the severity of the investigation, the questions over the president’s conduct and the potential benefits for witnesses who had read Mr Comey’s memos.

“An individual who is seeking to shape or mould his own statements around those of others thereby acquires an advantage in doing so that he would not otherwise have,” Mr Dreeben said, according to the transcript.

'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range Show all 6 1 /6 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The mug 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The tee 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The tee 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The can cooler 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The tee 'WITCH HUNT!' Trump cashes in on Mueller report with merchandise range The can cooler

Mr Dreeben acknowledged to the judge, James Boasberg of the US District Court for the District of Columbia, that Mr Trump was being investigated for obstructing justice and that the FBI had opened that inquiry before Mr Mueller’s appointment in May 2017.

“That investigation entailed matters that were covered in the Comey memoranda, which explored and recorded Mr Comey’s recollections of meetings, including one-on-one meetings with the president of the United States,” Mr Dreeben said, referring to the initial FBI inquiry. “In those meetings, events occurred that led the FBI to conclude that an investigation was appropriate under its authority to consider matters such as obstruction of justice.”

Mr Dreeben added, “In this instance, a person whose conduct is within the scope of the investigation is the president of the United States.”

Details of the transcript were first reported on Tuesday by CNN.

Many details from Mr Comey’s memos had already been made public at the time of the hearing. The New York Times reported in May 2017 that Mr Trump had asked Mr Comey for his loyalty and for an end to the investigation into his former national security adviser, Michael Flynn. The day after The Times reported on the Flynn encounter, Mr Mueller was appointed.

The next month, Mr Comey testified before the Senate Intelligence Committee about his interactions with the president.

Mr Dreeben said that although many parts of the memos had been previously revealed, it was still important to keep them away from those whose conduct was being scrutinised.

“Those memoranda are also far more detailed in many instances than the matters that Mr Comey revealed either in his statement for the record or in his oral testimony before the Senate,” Mr Dreeben said.

He said that because Mr Comey’s memos were written contemporaneously, witnesses would want their accounts to line up with the memos.

Things like Mr Comey’s memos “are typically held in confidence through the course of the investigation and any ensuing proceedings to ensure that all witnesses provide truthful evidence based on their own recollections and not on any inadvertent or advertent tailoring or influence from other witness statements.”

Mr Mueller’s office ultimately lost the battle — but not in the courtroom. In April 2018, the Justice Department provided copies to members of Congress, which immediately released them to the public.

A year after the memos became public, Mr Mueller finished his investigation and declined to decide whether the president obstructed justice. The attorney general, William Barr, cleared the president of wrongdoing.

But in his report, Mr Mueller detailed more than a dozen episodes that legal experts believe show how Mr Trump sought to interfere with the investigation. Among them were several of the encounters Mr Comey detailed in his memos.