Hillary Clinton's presidential campaign and the Democratic National Committee helped pay for political research into Donald Trump that ultimately produced a dossier of allegations about his ties to Russia, sources say.
The president has called the material "phony stuff," and on today he portrayed himself as the aggrieved party.
He posted a quote on Twitter that he attributed to Fox News: "Clinton campaign & DNC paid for research that led to the anti-Trump Fake News Dossier. The victim here is the President. @FoxNews."
"Clinton campaign & DNC paid for research that led to the anti-Trump Fake News Dossier. The victim here is the President." @FoxNews— Donald J. Trump (@realDonaldTrump) October 25, 2017
The FBI has worked to corroborate the document, and special counsel Robert Mueller's team, which is investigating potential co-ordination between Russia and the Trump campaign, questioned Christopher Steele, the former British spy who helped compile the claims in the dossier, weeks ago.
The dossier circulated in Washington last year and was turned over to the FBI for its review. It contends that Russia was engaged in a long-standing effort to aid Mr Trump and had amassed compromising information about the Republican.
Mr Trump has repeatedly dismissed the document as false and in recent days has questioned whether Democrats or the FBI helped fund it.
He has also challenged the findings of the FBI, NSA and CIA that Russia waged a large-scale influence campaign to interfere in the election. The FBI and the CIA have said with high confidence that the effort was aimed at hurting Mrs Clinton's candidacy and helping Mr Trump. The NSA found the same with "moderate" confidence.
A source said the funding arrangement was brokered by Marc Elias, a lawyer for the Clinton campaign and the DNC, and his law firm of Perkins Coie.
The deal began in spring 2016 when the firm was approached by Fusion GPS, the political research firm behind the dossier, and lasted until right before Election Day, according to the source.
When Fusion approached Mr Elias, it had already been doing research work on Mr Trump for a client during the Republican primary. The identity of the original client has not been revealed.
It is unclear what Fusion GPS had dug up by the time law firm hired it in April 2016.
According to a copy of the dossier published by BuzzFeed last year, the earliest report from Mr Steele dates to June 2016.
It was not immediately known how much money Fusion was paid or how many others in the Clinton campaign or DNC were aware that the firm had been retained.
Former Clinton campaign spokesman Brian Fallon said on Twitter that he regretted not knowing about Mr Steele's hiring before the election, and that had he known, "I would have volunteered to go to Europe and try to help him".
"I have no idea what Fusion or Steele were paid but if even a shred of that dossier ends up helping Mueller, it will prove money well spent," he wrote in another tweet.
According to a letter obtained by AP last night, representatives of Fusion GPS reached out in early March 2016 to express interest in continuing research on Mr Trump it had begun "for one or more other clients during the Republican primary contest".
At that time, the Clinton campaign was looking towards the election and was pivoting attention towards Mr Trump, who was emerging as the Republican front-runner.
The dossier created a political firestorm in January when it was revealed that then-FBI director James Comey had alerted Mr Trump to the existence of allegations about him and Russia.
Since then, the president has repeatedly attacked it and Republicans in Congress have worked to discredit it, even issuing a subpoena to force the disclosure of Fusion GPS's bank records.