For over a century there has been a divide in how we see legal pharmaceuticals used to treat illness and illicit ones we use to get high and party.

Yet the line is gradually blurring with the psychoactive substances in drugs such as ecstasy increasingly showing promise in the treatment of certain mental health conditions, meaning we could see them being legally prescribed in the next few years.

At the recent Psychedelic Science 2017 conference in California, researchers affiliated with the Multidisciplinary Association for Psychedelic Studies (MAPS) gave a presentation on phase II trials of the amphetamine relative MDMA being used to treat post-traumatic stress disorder (PTSD).

While this was the first public release of results they are yet to publish, the US Food and Drug Administration (FDA) had a sneak preview last November, and have already given their approval for testing to move onto the third and final stage.

To make sure a drug actually works, and that it has more benefits than risks, it moves through a number of levels of experimentation.

Pre-clinical testing is what we often read about with great excitement in news articles, where a chemical shows some promise in petri-dishes or animals.

From there it can be tested on healthy people in increasing doses just to make sure any down sides aren't too extreme. That's Phase I.

Phase II is to make sure the drug actually has some level of effect at safe doses. Scientists need to be careful to put in safeguards against them getting too enthusiastic and reporting an effect where there isn't one, using tools such as controls, blinding, and randomisation.

The third and often final phase – Phase III – is to see if the effect has enough value as a form of treatment. They're usually the longest and most expensive, since they need to prove their worth by comparison against existing options.

All of this means there is now convincing evidence that when 3,4-methylenedioxy-methamphetamine ( MDMA for short, though also called 'E', molly, or ecstasy when made and sold illicitly) is given to people with PTSD, it is safe and has a therapeutic effect.

PTSD is a chronic illness following distressing events in a person's life, such as violent experiences in war or natural disasters, or following psychological abuse.

These events can have a marked effect on the individual's neurology, reducing the level of activity in areas associated with memory and learning while increasing it in areas associated with fear and anxiety.

Nobody is all that sure on exactly how the treatment works on a chemical level, although it's understood that MDMA causes the neurons in certain parts of the brain to release stores of neurotransmitters serotonin, norepinephrine, and dopamine.

PTSD treatment usually involves patients recalling events that caused the trauma, which can potentially fail if they've developed habits that prevent them from remembering the event's details.

MDMA could be suppressing parts of the brain that might normally interfere with therapies while boosting others that promote trust and empathy.

"MDMA provides a sweet spot where therapeutic change can happen," said the study's principal investigator Michael Mithoefer.

"It affects neural networks so that people's experiences are not hijacked by fear."

In previous studies by MAPS, researchers found that 83 percent of participants showed no signs of PTSD after two months of receiving the drug alongside psychotherapy, with benefits sticking around for at least 4 years.

The results from this latest trial found that after one year of just two or three sessions of MDMA-assisted therapy, 67 percent of patients no longer showed signs of the condition on a clinically validated scale.

Only 23 percent of a control group receiving a placebo with therapy reported the same level of benefit.

"The results I've seen so far with MDMA are so much better than anything I've seen so far," said Mithoefer.

Now MAPS hopes to find up to 300 volunteers with PTSD for phase III trials, with therapists being trained to implement the treatment with therapy across North America and Israel.

If results are promising, it's possible in a few years the FDA could be giving the thumbs up to proceed with legislation that could see psychiatrists prescribing the drug for treatments.

While illicit substances have a reputation of being used purely for hedonistic reasons, a significant proportion of the community people takes drugs to deal with trauma.

Just as cannabis has become recognised for its medical benefits, it's good to see other previously vilified pharmaceuticals are also being dragged out of the shadows and appreciated for their therapeutic benefits.