President Trump blasted one of his staunchest allies on Wednesday — claiming that he never would have named Attorney General Jeff Sessions to his Cabinet had he known that Sessions was going to disqualify himself from the Russia probe.

“Sessions should have never recused himself,” Trump told The New York Times.

“And if he was going to recuse himself, he should have told me before he took the job, and I would have picked somebody else.”

Trump said he has been treated unfairly by Sessions — who, as an Alabama senator, supported him during the bruising Republican primary campaign, when many other GOP heavyweights were keeping their distance.

“Jeff Sessions takes the job, gets into the job, recuses himself, which, frankly, I think is very unfair to the president,” Trump told the Times.

“How do you take a job and then recuse yourself? If he would have recused himself before the job, I would have said, ‘Thanks, Jeff, but I’m not going to take you.’ It’s extremely unfair — and that’s a mild word — to the president.”

Trump also criticized Sessions’ performance in his Senate confirmation hearing, which included misstatements about Russian meetings that eventually led to Sessions’ recusal.

“Jeff Sessions gave some bad answers,” Trump said. “He gave some answers that were simple questions and should have been simple answers, but they weren’t.”

Sessions did not comment for the Times article, but conservative Iowa Rep. Steve King came to his defense.

“No one in America can match the excellence of @JeffSessions as Attorney General. Trump agenda would be crippled w\o him,” he wrote on Twitter.

Trump spent much of the interview defending the events that led up to the appointment of Robert Mueller as special counsel for the probe into Russian meddling in the 2016 election.

Trump warned Mueller not to look into his business or personal finances. When asked whether Mueller would be crossing a red line if he expanded his probe into the Trump family empire, the president replied, “I would say yes. I think that’s a violation. Look, this is about Russia.”

Trump did not say what he would do if Mueller subpoenaed financial records. However, the president reportedly has considered firing the special counsel.

Trump would not directly answer whether he would fire Mueller if he took the probe into Trump’s finances.

“I can’t answer that question because I don’t think it’s going to happen,” Trump said.

The president then blamed Deputy Attorney General Rod Rosenstein and ousted FBI Director James Comey for setting off the series of events that led to the special-counsel probe of Russia.

Trump also accused Comey of using a discredited Russian dossier full of lurid accusations against Trump as leverage against the president.

Comey told Trump about the dossier after an intelligence briefing two weeks before the election.

“In my opinion, he shared it so that I would think he had it out there,” Trump said. When asked if Comey was using it as leverage, Trump responded “Yeah, I think so — in retrospect.”

He also discussed the newly revealed conversation he had with Vladimir Putin at a dinner during the G-20 Summit in Germany.

While reports said Trump talked to Putin for an hour, the president claimed they spoke for only 15 minutes as they discussed the Russian adoption issue.