The Jeffrey Epstein case establishes beyond a doubt that if you’re a sexual predator, it pays to be a rich and connected sexual predator.

Epstein, now dead of an apparent suicide before his accusers had their day in court, worked the system and benefited from advantages and breaks unimaginable to anyone who didn’t jet around with influential friends.

The multimillionaire financier, who lived in Palm Beach and Manhattan, used his resources to build a network of sexual predation and then used the same resources to escape meaningful legal punishment. Even after registering as a sex ­offender, he lived a life of ease and glamour unavailable to even most of the 1%.

Epstein was the Jay Gatsby of sexual abuse, relying on his wealth to perfume over what should have been the overwhelming smell of sulfur.

He hired a highly credentialed, aggressive legal team that wooed and over-awed prosecutors who were supposed to hold him accountable for his crimes. A decade ago, the state prosecutor in Florida took a pass, and President Trump’s former labor secretary, Alex Acosta, the US attorney for Southern Florida at the time, applied the minimal possible sanction while affording Epstein ­every possible consideration.

There are overzealous prosecutors, then there are prosecutors overly intimidated by bold-faced defense counsel. In a letter explaining his handling of the case, Acosta described “a yearlong ­assault on the prosecution and the prosecutors.” The proper response of an office invested with the awesome powers of government, ­arrayed against a lowlife and his hired guns, should have been to double down. Instead, Acosta’s ­office buckled.

If any of the nameless victims had been rich or famous themselves and able to hire an Alan Dershowitz or Jay Lefkowitz, the result surely would have been different. A couple of years ago, Taylor Swift pursued, on principle, an assault case against a man who groped her at a meet and greet and won a symbolic $1.

But none of ­Epstein’s victims were Taylor Swift or anything like it. They were selected for abuse — because they were vulnerable. And failed by their government — ­because they were vulnerable.

Having minimized Epstein’s ­offense in Florida, his lawyers got busy minimizing the consequences. They somehow convinced a prosecutor in the office of Manhattan DA Cyrus Vance to ­petition a judge to lower Epstein’s sex offender status. The shocked judge rejected it out of hand. Vance said later that the request had been a mistake.

This held true to the pattern — all mistakes always worked in ­Epstein’s favor.

It was a mistake that Epstein got to leave 12 hours a day, six days a week while briefly in jail in Palm Beach, so he could pursue his “work” (including bilking one of his clients).

It was a mistake that New York City police didn’t enforce the requirement that Epstein check in with them every 90 days as required under his sex offender status. (Don’t you know, Epstein’s primary residence was a private ­island in the Caribbean, not New York?)

All the while, Epstein continued to socialize with fancy people, buying his way into their company and entertaining the great and the good at his New York City mansion.

It was only when the Miami Herald unearthed the enormity of his crimes that Epstein’s world began to unravel. He got charged with sex crimes by the Southern District of New York. Although, still, Epstein’s lawyers got what they wanted on at least one key request.

They reportedly asked for him to be removed from suicide watch while in custody despite a prior apparent suicide attempt. The authorities assented, and Epstein apparently killed himself, a punctuation mark on the futility and incompetence of a government that had ample opportunity to bring him to justice and failed every single time.

It shouldn’t be possible for a hideous monster to game the American system of justice, but it’s exactly what Jeffrey Epstein did, from loathsome beginning to unforgivable end.

Twitter: @RichLowry