Court documents released Monday show the Justice Department said former FBI Director James Comey was a "witness" in special counsel Robert Mueller's Russia investigation, citing Comey's memos detailing his interactions with President Trump.

The revelation adds verification to speculation that Comey and his memos played a role in Mueller’s efforts. Comey himself said he leaked his notes to the media to spark the appointment of a special counsel after he was fired in May 2017.

David Archey, a high-ranking FBI official, said in newly disclosed court documents from 2017 that “the FBI and Special Counsel’s Office have determined that disclosure of the Comey Memos — or any portions of them — could reasonably be expected to adversely affect the pending Russia investigation.” He explained that Comey’s memos had been “incorporated into a pending investigation and this compiled as investigative records.” Archey said these memos were compiled by May 12, 2017.

“The Comey Memos are his contemporaneous notes about incidents that are of interest in that investigation and are considered witness statements and therefore evidence in the Russia investigation,” Archey said.

Trump fired Comey on May 9, 2017, and then one of the memos subsequently leaked by Comey to a friend was detailed in the New York Times on May 16, 2017. Comey later explained to Congress that he leaked the memo to prompt a special counsel investigation. The day after the New York Times report, Mueller was appointed by Deputy Attorney General Rod Rosenstein to investigate possible coordination between the Trump campaign and the Russian government during the 2016 election.

Archey was an important figure in the court battle over the Comey memos. He was the deputy assistant director with the Counterintelligence Division who supervised FBI agents assigned to the 2016 investigation into Russian election interference.

Archey outlined the Justice Department’s position on the memos to the court in 2017, and the “First Archey Declaration” explained to the court why the special counsel had compiled the Comey memos in the first place. The court then “thought it helpful to seek more specifics as to the Memos’ connection with an ongoing investigation” and “asked that an attorney from the Office of Special Counsel proffer such information.” Michael Dreeben, who had been a counsel for the Special Counsel’s Office, provided the court with that “proffer” information. Archey’s answers to the court’s follow-up questions became known as the “Third Archey Declaration.”

Back on April 1, Judge James Boasberg of the District Court for the District of Columbia ordered that “the government shall file a notice indicating whether the completion of the Special Counsel's investigation permits the Government to release more material” related to Comey’s memos by April 8.

Two weeks after Mueller's investigation came to a close, the Justice Department said Monday that “in view of the conclusion of the investigation by the Special Counsel’s Office into Russian interference in the 2016 election,” the FBI had agreed to “withdraw the redactions made” to many of these documents.

The Justice Department long argued that the release of the Comey memos in full would interfere with the special counsel investigation, and the court had originally ruled in their favor. But redacted versions of the memos were eventually released to Congress and the public. Last month, the judge had ordered the Justice Department to turn over documents related to Comey’s memos.

CNN, USA Today, Judicial Watch, and the Daily Caller have been fighting for access to the Justice Department’s sealed arguments explaining to the court exactly why the department opposed the full release of the Comey memos. Those arguments from the Justice Department about why and how Mueller may have used the Comey memos have now been partially unsealed — it was information from Archey’s first and third declarations that was released this week.

Following the completion of the special counsel investigation, CNN asked the court to “unseal in full the First Archey Declaration, Third Archey Declaration, and a transcript of and any other records relating to the proffer proceeding” and to “place copies of those fully unsealed records on the public docket in this matter.” The court ruled that the Justice Department should hand that information over to the court for review and possible release.

Media and watchdog groups have tried to use the Freedom of Information Act to obtain information on Comey’s memos since May 2017, when the existence of the Comey memos became public, and that information is slowly being made available. The memos purport to detail conversations between Comey and Trump about which the two hotly disagree, and the outlets argued the public has a right to know.

Attorney General William Barr has said that Mueller did not charge anyone with criminal collusion with Russia, but that Mueller did not reach a conclusion on obstruction of justice one way or the other. The release of the Mueller report, with Barr’s redactions, is expected within a week.