Back in the 1990s, before he began studying the medicinal effects of MDMA on patients suffering from severe post-traumatic stress disorder, psychiatrist Dr. Michael Mithoefer would occasionally encounter patients who had experimented with the drug. They had, of course, taken MDMA for the same reason everyone takes MDMA — to experience the face-melting, dance-inducing effects of an illegal substance that is engineered to make you feel really, really good. For Mithoefer’s patients, however, the experience was a little more complicated.

“They were supposed to having fun, but suddenly stuff about their trauma would come up and they’d try to stuff it down, and they didn’t have the mindset or the supportive setting to really deal with it,” recalls Mithoefer. “So it ended up actually being problematic rather than helpful.”

Could Ecstasy Revolutionize Treatment Of PTSD? The FDA Seems To Think So

Dr. Michael Mithoefer studies the medicinal effects of MDMA on patients suffering from severe post-traumatic stress disorder.Courtesy photo

But Mithoefer, whose career has been defined by an enduring fascination with the therapeutic potential of psychedelic substances, had a theory: If taken in its pure form, and administered in a controlled environment, MDMA could be profoundly beneficial for people with PTSD. Now, more than a decade after Mithoefer first began testing his theory in a series of Phase 2 trials sponsored by his nonprofit organization, the Multidisciplinary Association for Psychedelic Studies, or MAPS, the Food and Drug Administration seems to have warmed up to the idea as well.

On Nov. 29, the FDA cleared the way for large-scale, Phase 3 clinical trials of MDMA. Expected to begin in the summer of 2017, the trials represent the final step before approval of MDMA as a prescription drug is possible. If approved, a drug typically associated with dayglow-adorned millennials collapsing into cuddle puddles and sucking on pacifiers beneath the crisscrossing laser lights of a Deadmau5 show might be an unlikely solution for those struggling with PTSD, including veterans scarred by the ravages of war.

“There’s a lot of sleep disturbance, a lot of anxiety, and a lot of rage,” says Mithoefer of the veterans who were enrolled in the Phase 2 studies, almost all of whom saw combat on the battlefields of Iraq and Afghanistan. “For some, the most troubling symptom was this rage that would come out towards their wives or their family members. It was really interfering with their lives and relationships. Most of them were not able to work before they started this study. Some had repeated suicide attempts.”

When first introduced to the psychiatric community in the 1970s, MDMA was embraced by thousands of psychiatrists as a drug that could possibly help treat anxiety disorders, including PTSD. But before formal trials could start, MDMA became a popular — and ultimately illegal — party drug, bringing progress on the medical front to a virtual halt.

“It’s a feel-good drug, and we know people are prone to abuse it,” Dr. Charles R. Marmar, the head of psychiatry at New York University’s Langone School of Medicine, told The New York Times, adding that prolonged use can lead to serious brain damage. There is also a concern among critics that legalizing MDMA for prescription use would signal to potential abusers that it’s not as dangerous as it actually is.

However, Mithoefer says the way MDMA is used in clinical setting bears little resemblance to how it’s used recreationally. For one, the drug’s euphoric effect is not the end goal, as it is for, say, a 21-year-old college student who “pops molly” at a music festival. Rather, the euphoria acts as a sort of truth serum, meant to help break down the internal barriers that prevent people with PTSD from acknowledging and addressing the underlying causes of their suffering.

Related: 5 Things We’ve Learned About PTSD Since 9/11 »

“We’re not just doing a drug study,” Mithoefer says. “We’re studying MDMA-assisted psychotherapy. There are no take-home doses. The intention is to heal the PTSD in a very safe, legal setting. That tends to be much more likely to foster therapeutic change than if someone is taking it at a party.”

During the Phase 2 trials, patients were administered a total of three doses over a period of several months. Some were given actual MDMA and some were given placebos. The trials were conducted as double-blind studies, meaning neither the patients nor the psychiatrists knew which type of dose — actual or placebo — was being administered. Once a patient was given the dose, he or she settled in for an eight-hour therapy session with two therapists. Equipped with headphones and eyeshades to use at their leisure, the patient largely determined how those eight hours unfolded. Aside from monitoring the patient’s vital signs, the therapists primarily functioned as guides, there to assist if called upon.

Press Association via AP Images

Could Ecstasy Revolutionize Treatment Of PTSD? The FDA Seems To Think So

According to Mithoefer, the biggest breakthroughs usually occurred in the periods between and after the sessions, when once-sequestered thoughts and emotions conjured up during those sessions were revisited with the aid of a therapist but without the aid of MDMA. By the end of one study, two-thirds of patients no longer met the criteria for PTSD.

“We pay a lot of attention to helping people integrate the experience afterwards,” Mithoefer says. “The MDMA seems to catalyze a therapeutic process that keeps on unfolding over weeks or months. So much happens after the MDMA has worn off, that people still kind of have a new relationship with how they process the trauma in therapy. People have said it changed their relationship with their emotions. They’re no longer afraid of their emotions.”

If approved by the FDA, MDMA could be available as a prescription drug by 2021. Those interested in following the Phase 3 trials, and potentially getting involved down the road, can stay abreast of developments on the MAPS website,