President Trump on Tuesday distanced himself from accused child molester Jeffrey Epstein — saying he was “not a fan” and that the former pals had a “falling out” years ago.

“I knew him like everybody in Palm Beach knew him. Everybody in Palm Beach knew him. He was a fixture in Palm Beach. I had a falling out a long time ago. I’d say maybe 15 years. I was not a fan of his, that I can tell you. I was not a fan of his,” the president said at the White House during an appearance with Qatari Emir Sheikh Tamim bin Hamad Al Thani.

Trump also defended Labor Secretary Alexander Acosta, who was involved in giving Epstein — who was busted Sunday on new sex crime charges involving children — a sweetheart plea deal in an earlier pedophilia case.

“I met Secretary Acosta the first time I know when I made the deal to bring him into the administration. I can tell you that for two and a half years he’s been just an excellent secretary of labor. He’s done a fantastic job,” the president said, crediting Acosta with helping boost the economy.

“Our economy is so good, our unemployment numbers are at record lows. So many good things are happening. But the fact is he’s been a very good secretary of labor.”

The commander-in-chief then said that the Epstein deal, which took place in 2008, happened years ago, and he suggested that everyone might look back and question decisions they had made in the past.

“You know, if you go back and look at everybody else’s decisions, whether it’s a US attorney or an assistant US attorney or a judge, you go back 12 or 15 years ago or 20 years ago and look at their past decisions, I would think you’d probably find that they would wish they maybe did it a different way,” Trump asserted.

“I do hear that there were a lot of people involved in that decision, not just him. I can only say this from what I know, and what I do is he’s been a great, really great secretary of labor. The rest of it, we’ll have to look at and have to look at very carefully. But you’re talking about a long time ago.”

Acosta was US attorney for the Southern District of Florida when he was involved in the plea deal that allowed Epstein to avoid federal charges.

Epstein spent about a year in a state jail and was required to register as a sex offender.

Trump told New York magazine in 2002 that he’d known the financier for 15 years and praised him as a “terrific guy.”

“He’s a lot of fun to be with,” Trump was quoted as saying. “It is even said that he likes beautiful women as much as I do, and many of them are on the younger side. No doubt about it — Jeffrey enjoys his social life.”