A Chester County Magisterial District judge diverted nearly $4,000 in campaign donations for personal expenses, using the funds to prop up his “six-figure gambling habit” at casinos in Pennsylvania, Delaware, and along the Jersey Shore, state prosecutors said Wednesday.

Michael J. Cabry III, 59, was charged by a statewide grand jury with theft by unlawful taking, perjury, and election code violations.

“Judge Cabry broke the law and undermined public trust in government by using campaign contributions for his own benefit,” Attorney General Josh Shapiro said in announcing the charges.

“Restricting how campaign money can be used helps prevent corruption," Shapiro said. "As a candidate and public official, Judge Cabry had a duty to serve with integrity and uphold the law. Instead he took advantage of the trust placed in him by supporters and the public.”

Cabry’s attorney, Dawson R. Muth, did not return a request for comment.

In an executive order issued Tuesday, Chester County President Judge John L. Hall stripped Cabry of his duties and barred him from entering the courthouse. His cases will be reassigned to other district judges.

Cabry, who first won his seat in 2000, has jurisdiction over municipalities in the northwestern portion of Chester County, including Elverson, Honey Brook, Wallace, West Brandywine, West Caln, and West Nantmeal. As a district judge, Cabry handled minor criminal and traffic offenses and oversaw preliminary hearings for cases later referred to county court.

The misuse of funds alleged by the grand jury took place during his reelection campaign in November 2017, when he ran unopposed. His current term ends in 2024.

In the run-up to the election, Cabry created “Citizens for Cabry,” a political action committee overseen by his niece, the grand jury said.

The committee only filed campaign finance reports for the first eight months of the year, signed and notarized by the judge, prosecutors said. Those reports, they said, reflected personal reimbursements to Cabry through debit cards linked to the committee’s bank account.

The reimbursements included ATM withdrawals at Delaware Park Casino, Dover Downs Casino, and Bally’s Resort & Casino, as well as stays at hotels near those casinos, the grand jury said.

For the months not covered by finance reports, prosecutors obtained and reviewed the PAC’s bank records. The records showed that Cabry continued to frequent those casinos, especially Delaware Park, where investigators estimate the judge gambled at least once a week in 2017. He wagered more than $100,000 at that casino in that time, they said.

At the time Cabry withdrew the money from the PAC, his personal accounts were “severely depleted,” the grand jury presentment said.

“Thus, Cabry chose to unlawfully use monies that campaign donors intended to be utilized for his political campaign to fund his personal expenses as he saw fit,” the grand jury wrote.

Cabry remains free on the condition he appears for a preliminary hearing in the case scheduled for Oct. 26.