Newly unsealed court filings show how the late Sen. John McCain, R-Ariz., and an associate shared with the FBI and a host of media outlets the unverified dossier that alleged the Russians had compromising information on now-President Trump.

McCain had denied being the source for BuzzFeed after it published the dossier, which was funded by the Democratic National Committee (DNC) and Hillary Clinton's presidential campaign, but had acknowledged giving it to the FBI.

RUSSIAN TECH FIRM USED IN HACKING OF DEMOCRATS, MCCAIN'S ASSOCIATE DISSEMINATED STEELE DOSSIER, UNSEALED DOCUMENTS

In a newly unsealed declaration from September, former senior counterintelligence FBI agent Bill Priestap confirmed that the FBI received a copy of the first 33 pages of the dossier in December 2016 from McCain.

In another filing, David Kramer -- a former State Department official and McCain associate -- said in a Dec. 13, 2017, deposition that the dossier was given to him by author and former British spy Christopher Steele, which he then provided to multiple journalists at outlets including CNN, BuzzFeed and The Washington Post. The details were first reported by The Daily Caller.

The report was also shared with State Department official Victoria Nuland, Obama National Security Council official Celeste Wallander and Rep. Adam Kinzinger, R-Ill.

The filings were unsealed as part of a libel case against BuzzFeed by a Russian businessman.

In his deposition, Kramer said that McCain gave a copy of the dossier to then-FBI Director James Comey on Dec. 9. Kramer told investigators that it was the sense from Fusion GPS founder Glenn Simpson that “having Senator McCain provide it to the FBI would give it a little more oomph than it had had up until that point.”

MCCAIN ASSOCIATED SHARED UNVERIFIED STEELE DOSSIER WITH BUZZFEED, COURT FILING SAYS

“I think they felt a senior Republican was better to be the recipient of this rather than a Democrat because if it were a Democrat, I think that the view was that it would have been dismissed as a political attack,” he said.

Kramer also described how BuzzFeed News reporter Ken Bensinger came to get hold of the dossier, before the outlet became the first to publish it in its entirety.

INSIDE THE TRUMP DOSSIER HANDOFF

He said that he showed Bensinger the dossier in December at the McCain Institute, but did not allow him to take pictures of it. But Kramer said he left Bensinger alone to read the memos and, in that time, Bensinger took photos of the dossier.

Kramer said he panicked when he saw that BuzzFeed News had published the document in its entirety online on Jan. 10, and immediately sought to have it taken down.

CLICK HERE TO GET THE FOX NEWS APP

“I called Mr. Bensinger, and my first words out of my mouth were ‘you are gonna get people killed,’” he said.

U.S. District Judge Ursula Ungaro recognized in a December 2018 opinion on the libel case that there had been a dispute whether Kramer gave Bensinger a copy of the dossier, or if Bensinger took photos when Kramer was not looking. However, in a later declaration, "Kramer stated that he had no objection to Bensinger taking a hard copy and had provided hard copies to other journalists," Ungaro wrote.

The FBI extensively relied on the dossier in its warrant applications to the Foreign Intelligence Surveillance Act (FISA) court in seeking to surveil Trump aide Carter Page -- even though some of the dossier’s claims have been called into question, including a claim that former Trump lawyer Michael Cohen traveled to Prague to pay off Russian hackers and other more salacious claims about Trump himself.

Fox News' Catherine Herridge, Lukas Mikelionis and Gregg Re contributed to this report.