Psilocybin is present in a wide range of mushrooms, especially in the genus Psilocybe, though why it exists in the mushroom is not fully understood. When ingested, psilocybin metabolizes to psilocin, which resembles the chemical structure of serotonin — a neurotransmitter that regulates mood, appetite, sleep, cognitive functions like memory and learning and feelings of pleasure. Psilocin may simulate serotonin, and stimulate serotonin receptors in the brain.

Psilocybin was first synthesized in the late 1950s, by the chemist Albert Hofmann (who also synthesized LSD from a fungus). In the years following its discovery, a number of studies were conducted, on psilocybin’s efficacy in treating alcoholism, as a tool in therapy and as a mechanism by which the terminally ill might better cope with despair. But clinical research into psilocybin became professionally marginalized, and research funding dried up about the same time it entered the mainstream as a recreational drug. Outlawed in 1968, it was swept up in the counterculture panic of the Nixon era and classified as a Schedule 1 drug, like heroin, under the Controlled Substances Act of 1970. A Schedule 1 drug means it is considered to have the highest potential for abuse and no currently accepted medical use.

It’s taken over four decades for the cultural taboo against psilocybin to relax enough for the drug to be re-examined for its medical applications, though a license to use it in a lab must be approved by the Drug Enforcement Administration and strict, time-consuming protocols must be met to ensure it is used safely. Still, doing this kind of research is no longer guaranteed to tank your career, and a small number of studies have been completed, with more underway, many of them building on the work accomplished by scientists in the 1960s.

A range of studies have suggested that controlled doses of psilocybin can help the user escape cognitive ruts of all sorts. One study, published in the British Journal of Psychiatry in 2012, rated the vividness of autobiographical memory of subjects on psilocybin and found the drug enhanced their recollection, and “subjective well-being” upon follow-up. The researchers concluded that psilocybin might be useful in psychotherapy as an adjunct therapy to help patients reverse “negative cognitive biases” — a phenomenon common in depression by which one has a greater recall of negative memories than positive ones — and facilitate the recall of important memories.

Other studies have suggested that psilocybin may modify obsessive compulsion by reducing symptoms like repetitive counting or hand-washing, and in a paper published in Neurology in 2006, the authors interviewed cluster headache sufferers who had used psilocybin to treat their horrific condition, and learned that even low doses — less than is needed to actually trip — could bring about remission. (I also know someone who claims psilocybin cured his stuttering.) A study published last year in the journal Experimental Brain Research found that psilocybin eliminated conditioned fear responses in mice, which has implications for sufferers of PTSD. And psilocybin has been shown to relieve anxiety, depression and despair in terminal cancer patients, who describe their experience as giving them a new perspective on their lives.