Returning from a court recess, Kevin L. Gray, a Washington gang leader already convicted of 19 murders in U.S. District Court, prepared to listen to attorneys argue about whether he should be sentenced to death. Before he took his seat, Gray lifted his arms and stretched, unfurling his suit jacket and revealing something that the court would rather keep secret.

Gray was wearing a wide, black belt strapped to his belly. Until then, only a few people in the courtroom knew that he was wearing the device -- known as a stun belt -- and that if Gray stepped out of line, a marshal was ready to press a button on a hand-held remote and deliver an eight-second, 50,000-volt shock that would drop him instantly to the floor.

For federal marshals and other court officers, stun belts are a way to enhance security in especially dangerous settings. But the devices have generated controversy, not only in the Gray case, but in courtrooms across the nation. Amnesty International calls stun belts "cruel, inhumane and degrading."

The Indiana Supreme Court has barred them, and in August, the California Supreme Court ruled that they should be used only as a last resort.

A federal appeals court in California restricted the use of stun belts, ruling that they can be used to deal with security risks but not to stop a defendant's verbal outbursts. One defendant won a $275,000 settlement in 2001 from Los Angeles County after filing a lawsuit that claimed he was improperly jolted for speaking up before the judge.

For more than 10 months of court proceedings, Gray and his five co-defendants wore stun belts under orders from Judge Royce C. Lamberth.

The judge was extremely careful to keep the use of the stun belts a secret from the jury to prevent any bias from entering into deliberations. The jury was not yet in the courtroom when Gray and co-defendant Rodney Moore -- leaders of a drug gang dubbed Murder Inc. by law enforcement -- took their seats.

Marshals did not trigger the stun belts in front of the jury during that trial, according to court sources. But the devices created much controversy.

Defense lawyers maintained that they were not necessary, and marshals said they were an important security tool, echoing arguments made in dozens of court cases over the past seven years.

The Remote Electronically Activated Controlled Technology stun belt can deliver a debilitating shock that drops the person wearing it, causing intense writhing and shaking and the loss of bowel control.

Stun belts are used in federal courts in the District, Maryland and Virginia and in some local jurisdictions, but they are not worn as a matter of routine in the Washington area. "It only happens with an extreme threat of violence in the courtroom," said Dave Turner, spokesman for the U.S. Marshals Service, who said the agency began using the belts in 1996.

Dennis Kaufman, a spokesman for the stun belt's manufacturer, Cleveland-based Electronic Defense Technology, said that as of last year, about 1,900 belts had been worn more than 65,000 times across the country and that none had caused a death. He said there have been nine accidental discharges and about 35 intentional ones.

Now that the jury has concluded its work in the Murder Inc. case, deadlocking on whether to sentence Gray and Moore to death, Lamberth has made public a court opinion that spelled out why he permitted stun belts.

Gray, 31, and Moore, 37, were given life prison sentences March 13. Moore was convicted of 10 slayings. Four co-defendants also were convicted.

In his opinion, Lamberth cited the seriousness of the crimes, the severity of the potential sentences, allegations of threats of violence made against witnesses and the likelihood that associates or rivals of the drug gang would be present at the trial as reasons for the extra precaution.

Well before the trial commenced last spring, prosecutors urged the judge to permit marshals to use stun belts. Defense attorneys countered that there were other methods of restraints and that the jury might notice the belts.

Gray's attorneys pointed out that the trial was held in a secure courtroom -- where bulletproof glass separates the defendants and attorneys from spectators -- and said that Gray had "never behaved inappropriately during any court proceeding." Wearing a stun belt also would make Gray feel confused, frustrated and embarrassed, they said.

Lamberth rejected the arguments, saying in his February 2002 opinion that he allowed stun belts in a similar trial in 2001 of a group of defendants including Tommy Edelin, a Southeast Washington gang leader convicted of ordering four killings.

Lamberth said that in that trial, the belts never were set off accidentally, remained out of sight and helped ease the need for additional, more visible security.

Edelin's attorney, James W. Rudasill Jr., said that even if the jurors don't see the belts, their use can taint the outcome of a trial.

"The defendants are always aware that they have them on. So it's hard for them to relax," Rudasill said. "It's going to limit the range of emotions that they could exhibit on the stand. It creates anxiety, and that anxiety is transmitted in their testimony." That anxiety, he contended, could be perceived by a jury as a sign of guilt.

Lamberth has barred attorneys for Gray, Moore and others in the Murder Inc. trial from talking about that case because another set of defendants still faces charges.

Lamberth took other strict measures during the trial, including keeping the jurors' names secret and having the jurors escorted to and from court by marshals each day.

In his opinion, Lamberth focused on issues of safety, declaring, "Courthouse personnel may be at risk, and the use of the secure courtroom certainly does not guarantee that the defendants will refrain from using violence to injure other people or attempt to escape."

Rayful Edmond III, far right, testifies against Kevin L. Gray, in glasses, in U.S. District Court in Washington last year. The defendants wore stun belts throughout their trial at the order of Judge Royce C. Lamberth.