A 57-year-old county Judge in upstate New York died after suffering a heart attack in the courtroom.

Putman County Court Judge James Reitz was hit by the heart attack on the bench Friday morning, a spokesman for the state court system said.

IOWA RUNNER, 26, DIES NEAR FINISH LINE OF 12 MILE RACE, TWO WEEKS AFTER COMING BACK FROM MT. EVEREST

Mary Ellen Odell, Putnam County Executive, told the New York Law Journal that Reitz completed one case and then asked for help.

“He said, ‘John, I think I need you to help me,’” Odell said.

Court officers immediately performed CPR and used an automatic electronic defibrillator to try save Reitz’s life until an ambulance arrived. It is unclear if the judge had previous or ongoing health issues.

The judge died shortly after arriving at the hospital.

CARNIVAL CRUISE LINE WOULDN'T LET PASSENGER OFF SHIP AFTER 'MAJOR' HEART ATTACK, LAWSUIT ALLEGES

Reitz, who lived in Mahopac, had been a county judge since 2007 and was also an acting justice with the state Supreme Court. Prior to that, he was a lawyer in private practice.

State Sen. Terrence Murphy expressed condolences in a Facebook post, praising Reitz for his drug court program and calling him the “ultimate public servant.”

Odell echoed the state senator’s comments and said in a statement that Reitz was an “outspoken advocate for addiction recovery and second chances.”

CLICK HERE TO GET THE FOX NEWS APP

“That is why he was a pioneer for his beloved Drug Treatment Court,” she noted, adding that the “program was instrumental in saving countless lives and families in Putnam County.”

The Associated Press contributed to this report.