After his pedophile conviction in Florida more than a decade ago, Jeffrey Epstein was shunned by most on Wall Street — with the notable exception of one of New York’s most affluent and powerful financiers.

Leon Black — a billionaire buyout king who last year was named chairman of New York’s Museum of Modern Art — had retained Epstein as the sole non-family director of his family charity for at least seven years leading up to 2008, tax records show.

That was the year Epstein pleaded guilty to two charges of soliciting prostitution, one involving a minor, resulting in an 18-month sentence, with 13 months served.

What is unusual, however, is that The Black Family Foundation — whose only two other directors were Black himself and his wife, Debra — kept Epstein as a director until the end of 2012, according to tax filings.

Epstein, who pleaded not guilty to sex-trafficking charges this week, did not appear to collect a salary for his work, according to the filings.

In 2015, Black — who as co-founder of buyout firm Apollo Global Management has amassed a fortune of $7 billion, according to Forbes — threw a lavish pool party at his Hamptons estate.

A source who attended told The Post he was shocked when he noticed that Epstein was among the guests, which also included a number of women in bathing suits.

“Leon had a personal relationship with Jeffrey, and I found it odd,” the source, who was at the pool party, said. “Why was what Jeffrey did not that bad?”

The fact that the relationship endured — despite a media firestorm that has trailed Epstein ever since — shows an “enormous level of intimacy and trust” between Epstein and Black, according to a source who knows Black.

Cozy ties with Epstein are now putting a spotlight on some of the convicted perv’s other longtime confidantes.

Those have included Les Wexner, the billionaire behind Victoria’s Secret who sold Epstein the mega-mansion on the Upper East Side where many of the alleged assaults against underage females took place.

Like Black, Wexner had employed Epstein at his own family foundation for several years before his pedophile conviction. But unlike Black, Wexner cut ties with Epstein after the Florida charges were filed against him, tax records show.

“You’d think if you ran a $200 billion firm you’d distance yourself” from a known sex predator like Epstein, a source close to Black told The Post, noting that Apollo is among the largest and most profitable private equity shops in the world.

A spokesman for Apollo referred questions about Epstein to Black, whose office didn’t respond to phone calls seeking comment.

Business Insider reported earlier on the Black Family Foundation’s link to Epstein.

Epstein — who until his arrest this week was living like a billionaire at his mansion at Nine E. 71st St., a five-minute walk from Leon Black’s apartment at 760 Park Ave. — has not left much of a trail indicating how he made his money, sources said.

When Epstein was a director, the Black Family Foundation donated hundreds of thousands of dollars to the Tony Blair Faith Foundation. Millions also were donated to the MoMA. Other common recipients included the tony Trinity School in Manhattan and Charles Bronfman’s Birthright Israel Foundation.