(CNN) A judge in upstate New York died after suffering a heart attack in his courtroom.

Putnam County Court Judge James Reitz had just finished a case on the bench Friday morning when he asked a court officer for help.

"They were getting ready to call the next case when Reitz said to the court officer that was with him, 'John, I think I need you to help me here,'" Putnam County Executive MaryEllen Odell told CNN.

Reitz then collapsed. The officer performed CPR on the judge until he was taken by ambulance to the hospital, Odell said. The hospital worked on him for about 30 to 45 minutes before he was pronounced dead. He was 57.

Reitz had been a judge in Putnam County since 2007, according to the New York Law Journal . Before that, he was a lawyer with a private practice.

Read More