Robert C Nalley, a former judge in Maryland, was sentenced to anger management classes, a year of probation, and was hit with a $5,000 fine on Thursday.

Nalley pled guilty to deprivation of rights under color of law for ordering a deputy sheriff to shock a defendant during a 2014 criminal trial, SM News reports. The defendant was wearing a “stun cuff” on his ankle and fell to the ground screaming after he was shocked, as seen in the court video.

Delvon King was up on firearm charges and was wearing the ankle cuff due to his detainee status in Charles County. The stun cuff allows authorities to administer punishment from afar, by pressing a button to send a shock to the wearer.

King was representing himself at the time. It was during the jury selection process that Nalley objected to King’s reading of a prepared statement. Nalley ordered King to stop reading, and then told an officer to administer a shock. “Mr Sheriff, do it, use it!” Nalley ordered.

King was shocked for five seconds with a 50,000-volt shock, and screamed loudly throughout. After the shock, King can be heard crying in pain.

“I got shocked and I was screaming for help. They had no reason to harm me like that. I really didn’t expect for any of that to happen,” King said following the event.

“Disruptive defendants may be excluded from the courtroom and prosecuted for obstruction of justice and contempt of court, but force may not be used in the absence of danger,” said US Attorney Rod J. Rosenstein at sentencing on Thursday.

Nalley is no longer allowed to preside over cases in Maryland, and acknowledged the use of the stun cuff was“unreasonable under the circumstances.” No kidding.

Nalley had a reputation for unusual behavior before the shocking incident. In August 2009, he deflated the tires of a car belonging to a cleaner in the La Plata courthouse. Her ‘crime’ was using the judge’s parking spot after hours because she didn’t feel comfortable walking through the parking lot alone at night.

After attempting to justify his actions, Nalley pled guilty and was forced to write an apology to the cleaner, and was given probation.

Nalley was a judge on the Circuit Court in Charles County Maryland from 1988 to 2014.