In fact, that was the case, an indication of a yearslong friendship between the president and Mr. Epstein that some say ended only after a failed business arrangement between them. The full nature of their eventual falling out is not clear.

But through a mutual appreciation of wealth and women, and years of occupying adjacent real estate in Palm Beach and on Page Six, the lives of the two men routinely intersected for decades — until the connection turned from a status symbol into a liability, and Mr. Trump made sure to publicize the fact that he had barred his onetime friend from his clubs.

“In those days, if you didn’t know Trump and you didn’t know Epstein, you were a nobody,” said Alan Dershowitz, the longtime Harvard University Law School professor who later served on Mr. Epstein’s defense team when he was charged with unlawful sex with minors in 2006.