Researchers say the “club drug” ketamine might be effective against those painful migraine headaches. Here’s the reasons why it might.

Migraine pain is notoriously difficult to treat.

But a new study shows that the drug ketamine may provide some relief to patients for whom other drugs have been ineffective.

Researchers at Thomas Jefferson University Hospital in Philadelphia studied 61 patients who received continuous three-day to seven-day treatment with ketamine.

The drug is more commonly used as an anesthetic, a sedative, and to treat depression.

Ketamine also is sometimes used illicitly as a hallucinogenic “club drug” with the nickname “Special K.”

The study, which was presented at Anesthesiology 2017, the annual meeting of the American Society of Anesthesiologists, found that about three of four migraine patients reported improvements in their pain intensity at the end of the treatment period.

“These are patients for whom nothing worked at all or made a dent in their migraine pain,” Dr. Eric Schwenk, director of orthopedic anesthesia at Thomas Jefferson University Hospital and a study co-author, told Healthline.

Patients who received ketamine infusions for intractable migraine headaches — migraines that haven’t responded to any other therapies — rated their average migraine pain at 3.4 on a 10-point scale at discharge.

That’s compared with an average of 7.5 upon admission to treatment.

The lowest pain ratings were reported on the fourth day of treatment.

“Our study focused only on short-term relief, but it is encouraging that this treatment might have the potential to help patients long term,” said Schwenk in a press statement. “Due to the retrospective nature of the study, we cannot definitively say that ketamine is entirely responsible for the pain relief, but we have provided a basis for additional larger studies to be undertaken.”