President Trump, in a wide-ranging sparring session with reporters Wednesday afternoon, blasted Hillary Clinton over new revelations her campaign helped fund a salacious anti-Trump dossier last year – calling the project a “disgrace” and claiming the tables have turned on Democrats over the “Russia hoax.”

“They’re embarrassed by it, but I think it’s a disgrace,” Trump told reporters, before heading to Texas for a briefing on Hurricane Harvey recovery efforts and a Republican fundraiser. “It’s a very sad commentary on politics in this country.”

In the midst of a court case that threatened to reveal the dossier’s funding, it emerged Tuesday night that political consulting firm Fusion GPS was retained last year by Marc E. Elias, an attorney representing the Democratic National Committee and the Clinton campaign. The firm then hired former British intelligence officer Christopher Steele to write the dossier that contained unverified and lurid allegations about Trump and his team’s ties to Moscow.

The Washington Post first reported on the connections, which were confirmed by Fox News.

Trump, though, repeatedly said Wednesday that this information only came out because the court case would have revealed it. Amid a series of Russia-related controversies that have Democrats – at least for now – on defense, Trump suggested the allegations of Russia collusion with his campaign have boomeranged and are hurting Democrats.

“The whole Russia thing … this was the Democrats coming up with an excuse for losing the election,” Trump told reporters. “They lost it and they lost it very badly. And they didn’t know what to say, so they made up the whole Russia hoax.”

Trump added: “Now it’s turning out that the hoax is turned around, and you look at what’s happened with Russia and the uranium deal and the fake dossier, and it’s all turned around.”

'The whole Russia thing...this was the Democrats coming up with an excuse for losing the election' — President Donald Trump

Trump was referring not only to the dossier but the Obama administration’s 2010 approval of a Canadian mining company’s sale to a Russian firm that gave them partial control of U.S. uranium reserves.

The law firm that retained Fusion GPS reportedly was paid millions in legal fees by the Clinton campaign and the DNC.

Sources, however, told The Post that neither the Clinton campaign nor the DNC specifically directed Steele’s work, labeling the intelligence officer simply as a Fusion GPS subcontractor.

The Democratic National Committee, meanwhile, stressed that the current leadership was not involved in the arrangement.

“Tom Perez and the new leadership of the DNC were not involved in any decision-making regarding Fusion GPS, nor were they aware that Perkins Coie was working with the organization," DNC Communications Director Xochitl Hinojosa said in a statement. "But let’s be clear, there is a serious federal investigation into the Trump campaign’s ties to Russia, and the American public deserves to know what happened.”

A spokesman for Rep. Debbie Wasserman Schultz, D-Fla., who led the DNC at the time, told Fox News on Wednesday that, “She did not have any knowledge of this arrangement.”

What exactly Hillary Clinton knew is unclear. But Clinton campaign spokesman Brian Fallon said in a statement that, “I personally wasn’t aware of this during the campaign.” However, he said, “if I had gotten handed it last fall, I would have had no problem passing it along and urging reporters to look into it.”

The Washington Post report noted that while Elias and his law firm retained Fusion GPS in April 2016, the firm’s research before that was funded by an “unknown Republican client” during the GOP primary.

Asked Wednesday if he knows who that was, Trump teased the media.

“I think I would know but I won’t say,” he said. “I have one name in mind. … It will probably be revealed.”

During his Q&A with reporters on the White House lawn, the president pivoted to a range of other subjects, including Republican unity as compared with Democratic unity.

“I’ll tell you what—honestly, the Republicans are very, very well united,” Trump said, while claiming there’s “hatred, division and animosity” between Democrats like Bernie Sanders and Hillary Clinton.

The president covered immigration, tax reform and opioid abuse.

Trump told reporters he would “love to do a DACA deal,” but he needed something “very substantial” to complete legislation helping so-called dreamers -- listing “the wall” and the ability to “stop drugs from pouring in” to the U.S. Trump again vowed that at some point, the administration would declare a “national emergency” for the opioid epidemic.

Trump jumped to tax reform, promising an “incredible” plan.

“We’re going to bring back $4 trillion, I think at least, from overseas, and that money is going to be put back into our country,” Trump said.

He also defended his phone conversations with Gold Star families, amid controversy over one phone call with the widow of Sgt. La David Johnson, who was killed in Niger.

“It’s a rough time for these people. It’s a tough time. It couldn’t be tougher. But I have such respect for those families,” Trump said.

Rep. Frederica Wilson, D-Fla., as well as the widow, Myeshia Johnson, had criticized Trump’s tone during that call.