A trust that’s been bankrolling the legal fees for five Nxivm sex cult leaders is quickly running out of cash ahead of the case’s April trial date, a Brooklyn judge revealed on Monday.

Federal Judge Nicholas Garaufis didn’t divulge how much Seagrams heiress Clare Bronfman dumped into the irrevocable trust to pay the legal team for her co-defendants — including Nxivm leader Keith Raniere and “Smallville” actress Allison Mack.

But he said only about 25 percent of that money remains.

“A good portion of those funds have already been expended in terms of representation of your clients,” Garaufis told the group of defense lawyers at a hearing he’d called over issues with the money. “When those funds have been expended — which could be any time in the near future — what happens then? That’s a real issue for the court.”

The judge said he wanted to start the trial April 29 with no delays. He warned that if the case needs new attorneys, they must be brought on as soon as possible.

“If I need to appoint counsel for the defendants that cannot pay additional legal fees, I need to do that soon so we can go ahead with the trial on time,” Garaufis said.

“The unusual structure of your representation, or at least the arrangements you have with your clients taken into the trust, it’s a little bit complicated,” the judge added. “I’ve never run across this before in 18 years.”

The defense attorneys acknowledged that the money is destined to run out but promised to stick by their clients — which Garaufis ordered them to submit in writing.

“The money is going to run out, we are not going to get our whole trial fee,” said Marc Agnifilo, who represents Raniere. “I am not going anywhere. I’m seeing this through the whole trial. I don’t expect that the trial fee will ever be paid in full.”

In December, it emerged that Bronfman — the heiress of the booze and beverage empire — was secretly paying the legal fees for her fellow accused cult members.

She is charged with racketeering conspiracy and conspiracy to commit identity theft for allegedly aiding Raniere to run his self-help group — which prosecutors claim brainwashed women into becoming his sex slaves.

Prosecutors raised issues with the communal legal fund, saying the fact that it could “subject an attorney to undesirable outside influence raises an ethical question ‘as to whether the attorney’s loyalties are with the client or the payor,’” they wrote in previously filed court papers.

But Bronfman’s lawyer, Susan Necheles, insisted Monday that the fund was set up so her client couldn’t wield any influence.

The trust is structured “in a way so nobody can control someone’s legal strategy,” she told the judge.

Garaufis said he hasn’t yet reviewed Agnifilo’s third request to release Raniere on $1 million bail.

Raniere and Mack are facing charges of sex trafficking for running the secret group, which allegedly branded women and instructed them to sleep with Raniere.