A Florida sheriff has discontinued a work-release program that allowed billionaire pedophile Jeffrey Epstein to visit his office most days while serving time in a county lockup a decade ago.

Palm Beach County Sheriff Ric Bradshaw, who faced withering criticism for granting the pervy financier the privileges, released a statement saying he had ended the program that allowed a few jail inmates to continue working.

The decision came after the program was reviewed by the county’s independent Criminal Justice Commission.

From now on, Bradshaw said, a judge’s order will be required for anyone sentenced to the jail to qualify for in-home detention or the ability to do work outside the jail, the Miami Herald reported.

Bradshaw suspended the program in August after it was blasted because of Epstein’s treatment after he pleaded guilty in 2008 to prostitution-related charges involving underage girls.

“This decision not only saves money by placing inmates at their home on house arrest, but also places total control of the decision-making process in the hands of the court system, and the presiding judge,” Bradshaw said in a statement.

During his 13-month stay at the jail, Epstein’s driver would pick him and a guard up in the morning and he would spend the day working and meeting with visitors, before returning to the jail for the night.

Epstein also was allowed to visit his Palm Beach mansion, despite restrictions on home visits.

A 2008 letter from then-US Attorney Alexander Acosta said Epstein should not have been approved for the work-release program.

Epstein had been approved for the program, despite Florida laws barring people who have committed three violations in five years from eligibility, according to a Dec. 11, 2018, letter written by south Florida Assistant US Attorney A. Marie Villafana.

A 2007 federal indictment accused Epstein of grooming, paying and coercing underage girls into having sex with him. But Acosta — the former US labor secretary — allowed him to take a non-prosecution plea deal for a lesser state charge of soliciting prostitution with a minor.

Epstein, 66, hanged himself in August at the Metropolitan Correctional Center in Manhattan while he was awaiting trial for sex trafficking.