A Maryland judge who pleaded guilty (PDF) to civil rights violations for ordering a deputy to remotely shock a defendant with a 50,000-volt charge was sentenced Thursday to a year of probation and ordered to attend anger management classes.

The shocking, ordered by then-Charles County Circuit Court Judge Robert Nalley, occurred in July 2014 during jury selection for a trial concerning a man accused of carrying a loaded handgun during a police stop. The judge was asking the defendant if he had questions to submit to prospective jurors, who were not yet in the courtroom. Delvon King, the 25-year-old defendant acting as his own attorney, refused to answer several times. After some verbal back and forth between the two, Nalley told the court deputy "Do it. Use it," according to court documents (PDF).

After Nalley's sentencing, Maryland US Attorney Rod J. Rosenstein said that "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."

King eventually agreed to serve two years after withdrawing a motion for a new trial. During the incident, a stun cuff attached to King's ankle was activated for about five seconds via a remote control held by a courtroom deputy. King fell to the ground and screamed in pain.

Stun cuffs, which are about the size of a deck of cards, are being used more frequently at detention centers and courthouses. Produced by various companies, they cost about $1,900 for a device and transmitter. Some models can shock at 80,000 volts.