MANHATTAN (CN) – The prospects of Jeffrey Epstein awaiting a sex-trafficking trial from his $77 million Upper East Side mansion were always remote.

Thanks to Second Circuit ruling Thursday, however, Epstein’s odds at an appellate reversal dropped to virtually nil.

Taking a buzzsaw to a bail system that allows only the wealthiest of criminal defendants to await trial in the lap of luxury, the court handed down its decision in a little-watched securities case against Jean Boustani, a negotiator for the Abu Dhabi-based holding company Privinvest.

“To interpret the Bail Reform Act as requiring district courts to permit wealthy defendants to employ privately funded armed guards where an otherwise similarly situated defendant without means would be detained would violate this core principle,” U.S. Circuit Judge Jose Cabranes wrote for a unanimous three-judge panel. “Such a two‐tiered system would ‘foster inequity and unequal treatment in favor of a very small cohort of criminal defendants who are extremely wealthy.’”

The quotation at the end of that passage cites a ruling in the case of Reza Zarrab, a gold trader who wanted to lay low in his Manhattan high-rise while awaiting trial on the biggest sanctions-busting scheme to Iran ever charged in U.S. history.

U.S. District Judge Richard Berman shot down Zarrab’s bid and is also presiding over Epstein’s prosecution, which will likely see reverberations from today’s ruling against Boustani.

Randall Jackson, a former New York federal prosecutor who represents Boustani, did not return an email seeking comment. Representatives for the Eastern District of New York, where he is being prosecuted, declined to comment.

Vanishingly few criminal defendants can afford to hire private security guards tasked with standing watch over them in mansions that serve as their bespoke pretrial jails, but that phenomenon has occurred several times in the past.

During the bribery trial of Chinese businessman Ng Lap Sang, the billionaire required the court’s permission for a masseuse to give him massages in the privacy of his bedroom. A federal judge allowed Ng to continue receiving the rubdowns, but he ordered him to keep the door open for the guards’ inspection.

Marc Dreier, a lawyer who pleaded guilty to defrauding hedge funds, won a bail package allowing him to await trial in a guarded East Side apartment, an arrangement The New York Times described as a “gilded cage.”

Today’s ruling in the Boustani case clarifies a 2007 ruling where the Second Circuit approved a similar arrangement for Varsha and Mahender Sabhnani, a couple charged with forced labor.

“Since Sabhnani, however, we have highlighted our concerns regarding granting bail to defendants because of their wealth,” the opinion states.

Splitting the difference, the panel allowed for privately funded guard arrangements for when a defendant is deemed flight risk primarily “because of” wealth.

In the Epstein case, Berman’s concerns about flight risk stretch far more broadly, with the judge citing Epstein’s decoy passport, private jets, untold assets in cash, art and diamonds, and financial ties outside the United States.

“Viewing the totality of the circumstances, the court finds that the government has shown by a preponderance of the evidence that Defendant is a serious risk of flight and that no conditions can be set that will reasonably assure his appearance at trial,” Berman wrote. Epstein’s attorneys Reid Weingarten and Martin Weinberg did not immediately respond to an email request for comment.