A federal appeals court says a Massachusetts school can continue to use an electric shock device as therapy for special-needs students, vacating a U.S. Food and Drug Administration ban on the practice. 

The ruling, handed down Tuesday by a panel of judges for the U.S. Court of Appeals for the District of Columbia circuit, states the Judge Rotenberg Educational Center can continue using “electrical stimulation devices used to treat aggressive or self-injurious behavior.”

That practice had earlier been banned by the FDA under its authority to regulate certain medical devices.

The school has used the method for decades, which a United Nations panel has called torture.

In the ruling this week, the judges said the FDA “may not enact the regulation at issue.”

The ruling also reads: “The FDA has no authority to choose what medical devices a practitioner should prescribe or administer or for which conditions.”

The Canton, Mass., center praised the ruling, saying, “With the treatment, these residents can continue to participate in enriching experiences.”