The Food and Drug Administration on Wednesday announced that electrical shock devices used to discourage aggressive or self-harming behavior in patients with mental disabilities will be banned, following years of pressure from health experts who have called the treatment ineffective and unethical.

For years, the shock devices have been used by only one place in the United States: The Judge Rotenberg Educational Center of Canton, Mass., a residential school for people with autism and other disabilities.

School administrators have called the shocks a last resort to prevent dangerous behaviors, such as head-banging, throwing furniture or attacking teachers and classmates.

Electric shocks and other painful treatments known as "aversive conditioning" were more widely accepted decades ago, but mainstream psychiatry now relies on behavioral modification, prescription drugs and other therapies.

"Through advancements in medical science, there are now more treatment options available to reduce or stop self-injurious or aggressive behavior," said Dr. William Maisel, a director in the FDA's device center.

The Rotenberg school has used shock devices carried in students' backpacks, which were attached to their arms and legs via electrodes. School staffers could trigger a two-second shock to a patient's skin by using a remote controller.

HOW MANY AMERICANS DIE BY JUMPING ON TRAIN TRACKS EACH YEAR?

Some patients from the Rotenberg center have compared the shocks to a bee sting or worse. The school has faced several lawsuits brought by families who said the shocks traumatized their children. But other parents have said the technique was the only thing that prevented violent behavior linked to mental disabilities.

The FDA said in a statement that the therapy can exacerbate dangerous behaviors and lead to depression, anxiety and post-traumatic stress disorder. Patients have also suffered burns and tissue damage due to the device, the agency said.

CLICK HERE TO GET THE FOX NEWS APP

Regulators said patients should instead receive treatments that focus on eliminating factors that trigger the behaviors or teaching patients coping skills to deal with them.

The Associated Press contributed to this report.