Ketamine, an anesthetic that can cause hallucinations and has been used for decades as a recreational club drug, could be a valuable new anti-depressant, according to a new study.

The analysis of 41,000 patients in the journal Scientific Reports is the largest investigation of the population-level benefits of ketamine so far.

“This study extends small-scale clinical evidence that ketamine can be used to alleviate depression, and provides needed solid statistical support for wider clinical applications and possibly larger scale clinical trials,” said Ruber Abagyan, senior author, a professor of pharmacy at the University of California San Diego.

The data came from the FDA Adverse Effect Reporting System. The initial grouping of 8 million patient records was narrowed down to 41,000 to focus on the use of ketamine.

But the pharmacy experts worked backward in the database. They looked for the lack of depression as a “side effect” of ketamine.

“While most researchers and regulatory monitor the FAERS database for increased incidences of symptoms in order to spot potentially harmful drug side effects, we were looking at the opposite – lack of a symptom,” said Isaac Cohen, another of the authors, a pharmacy student at UCSD.

The incidence of depression symptoms in the patients who took ketamine was 50 percent lower than their peers who took other drugs for pain management.

Along their analysis, they found a similar correlation among three other drugs: the cosmetic and migraine treatment Botox, the non-steroid anti-inflammatory drug called diclofenac, and an antibiotic called minocycline. (The anti-inflammation properties of diclofenac and minocycline may cause the reduction in depression symptoms, they hypothesize. However, the Botox explanation has not been explained).

Ketamine was first synthesized in 1962, an intended for use as a fast-acting anesthetic. It was approved by U.S. regulators in 1970 for use in humans – but it quickly became known for illicit use in the 1970s and 1980s, first among New Age users and then later in dance clubs. Currently its regulated use is tightly controlled.

Ketamine has been known as a potential anti-depressant for about a decade, but most of the studies until now have focused on small groups of patients. Negative side effects, such as hallucinations and dissociation, have also limited its use as a treatment. As Yale University researchers have warned, the dosage and administration of the drug remains an unknown set of variables that have yet to be studied further.