An Israeli politician attempting to unseat Prime Minister Benjamin Netanyahu — and under fire for his ties to Jeffrey Epstein — says his lawyers are working to cut his financial links to the rich pedophile.

Ehud Barak, the country’s former prime minister who is running against Netanyahu in September, used several million dollars of Epstein’s money to finance a security company, according to Haaretz.

Barak also is a personal friend of Epstein, who was convicted of soliciting a young woman for sex in Florida in 2008 and now faces a slew of new sex-trafficking charges in Manhattan.

Barak defended his actions during a TV interview Saturday, saying of Epstein, “He’d served his sentence for soliciting prostitution — the indictment didn’t say she was a minor,” according to the Jerusalem Post.

In the Florida case, a plea deal allowed Epstein to escape federal charges at the time, in exchange for him pleading guilty to a single count of soliciting prostitution from girls as young as 14.

Barak said his lawyers are working to sever financial ties with the accused billionaire, the Jerusalem Post said.