Humanity just can’t make up its mind about cannabis. For thousands of years, humans have used the stuff as medicine or to travel on spiritual quests. That, though, didn’t quite suit the British, who banned cannabis in colonial India. Then in the 20th century, the United States government declared war on marijuana, and most of the world followed suit.

But today, state after state is calling out the federal government on its absurd claim that weed should be a schedule I drug—an extreme danger with no medical benefits—and should fall in the same category as heroin. Even on the federal level, congressional reps like Elizabeth Warren are fighting to end the criminalization of cannabis use. The fact is, scientists have proven cannabis can treat a range of ills and that it’s actually much safer than alcohol. The twisty-turny journey of cannabis has landed us back at a central truth: It’s actually a powerful medicine that can help treat what ails the human body.

Matt Simon covers cannabis, robots, and climate science for WIRED.

Yet as governments come around to the fact that the war on cannabis—which has had a massively disproportionate effect on black Americans—is both insane and unwinnable, the drug remains largely mysterious. The root of the problem: Unlike a relatively simple drug like alcohol, cannabis is made up of hundreds of compounds in addition to THC, all interacting in ways scientists are just beginning to understand.

But therein lies the beauty of it. Things are getting real nerdy with cannabis science. So let us guide you through the haze.

The History of Cannabis

The cannabis plant probably originated in Central Asia, and may have been one of the first plants cultivated by humans. In addition to its psychoactive charms, cannabis gave early growers nutritious seeds to eat and useful fibers for rope. (Today, the industry makes rope out of hemp, a variety of the plant with little to no THC, and therefore no psychoactivity. Hemp fibers are even making their way into construction materials.) And our ancestors were aware of some of the medicinal benefits of cannabis: The ancient Chinese deity Shennong, or “God Farmer,” recommended that cultivators grow “hemp elixir” to treat the sick. Cannabis has a particularly rich history in India, where it has been used for thousands of years as a spiritual aid.

Even as great societies of metal and stone formed, cannabis remained an indispensable crop. Ancient Rome, for instance, wouldn’t have been the sea power it was without super-strong hemp sails and ropes. The British and Spanish, too, powered their world-spanning empires with hemp riggings. George Washington grew the bejesus out of cannabis.

CANNABIS GLOSSARY Cannabinoids

Compounds that bind to receptors in the human body’s endocannabinoid system, producing both psychoactive effects, in the case of THC, and non-psychoactive effects, in the case of CBD.

Chemotype

The distinct chemical makeup of an individual cannabis plant, which varies both because of genetics and because of environmental factors. Researchers are now experimenting with how to tweak light and soil composition to express or suppress certain chemical components.

Hemp

A variety of the cannabis plant that contains vanishingly small amounts of THC. Its use to humanity lies in its extremely strong fibers.

Marinol

A synthetic form of THC used to treat ailments like nausea and low appetite. Its cousin is Sativex, which also includes a dose of CBD that may help offset the psychoactive effects of THC.

Terpenes

A family of compounds that give cannabis its unique smell. However, terpenes are not limited to the cannabis plant—citrus plants have them as well. Many plants use these volatile compounds to ward off insects.

The Entourage Effect

The anecdotal, though increasingly data-backed, theory that different compounds in cannabis contribute to the high the plant produces. Research shows, for instance, that while THC alone can lead to paranoia, pairing it with CBD tends to attenuate the psychoactivity.

All the while, it wasn’t like humanity had forgotten that cannabis was also good for getting high. Mexico in particular emerged as a major cultivator of psychoactive strains in the early 1900s, and that cannabis wafted over the border into the United States. Then, in 1937, the US passed the Marijuana Tax Act, which effectively criminalized the drug. And in 1970 the Controlled Substances Act branded cannabis a schedule I drug, essentially equating it with the devil himself.

As with the prohibition of alcohol, banning the consumption of cannabis just drove the drug underground. Which brings us to the legend of Northern California, mecca of cannabis production. Over the last few decades, cultivators have hidden themselves in the wildlands, producing perhaps 75 percent of the domestically grown cannabis consumed in the US. Growers here have selected plant generation after plant generation for high THC content, to the point where you can now regularly find flower with 25, even 30 percent THC, whereas a few decades ago the average was around 5 percent.

While Northern California’s growers were proving themselves masters of cannabis cultivation, the plant remained—and to large degree still remains—mysterious. That’s because it’s extremely difficult for researchers to study a schedule I drug. Until 2016, for instance, the DEA claimed a monopoly on the official supply of research cannabis, licensing a single farm at the University of Mississippi that produced legendarily crappy weed that looks nothing like what’s out in the market. (Like, literally. It’s so bad it doesn’t even look or smell like weed as we consumers know it.)

That regulatory wall, though, is crumbling, and science is rejoicing.

The Future of Cannabis

Throughout history, humans have used cannabis as a medicine without the confirmation of methodical scientific studies. The Aka people of the Congo River basin, for example, use the drug to ward off intestinal worms. Anecdotally, cannabis is great for treating pain as well.