Ecstasy starts as a natural oil found in certain tropical trees, gets processed through underground chemistry labs, and ends up pressed into the colorful pills sold on the street. The story spans more than a century, multiple continents, and a constant cat-and-mouse game between clandestine chemists and international drug regulators.
The Original Synthesis at Merck in 1912
MDMA, the active compound in ecstasy, was first created by German chemist Dr. Anton Köllisch while working for the pharmaceutical company Merck. He wasn’t trying to make a party drug. Köllisch synthesized MDMA as a by-product in 1912 while attempting to create hydrastinin, a substance used to stop bleeding. Merck patented the preparation method that year, but the compound sat largely forgotten for decades.
It wasn’t until the mid-1970s that MDMA resurfaced. American chemist Alexander Shulgin learned about a “special effect” the compound produced, re-synthesized it in his lab, and tried it himself in September 1976. The following year, he introduced it to psychotherapist Leo Zeff, who began using it as a tool in talk therapy and shared it with other therapists. In 1978, Shulgin co-published the first paper describing MDMA’s effects in humans. This chain of events is why he’s sometimes called the “father” of MDMA, even though he wasn’t the one who originally made it.
Sassafras Trees and Safrole Oil
The key raw ingredient for most ecstasy production is safrole, an oily liquid extracted from the roots and bark of sassafras-related trees. The chemical backbone of MDMA, a ring-shaped structure called 1,3-benzodioxole, appears naturally in various plant oils, spices, and traditional medicines. But the most efficient source has long been sassafras root oil.
Safrole-rich oil can be extracted from over 360 tree species across Southeast Asia. Cambodia has been one of the most significant sources. There, a tree locally known as Mreas Prov Phnom grows in the western forests, where operators set up makeshift distilleries deep in the jungle to steam-extract the oil. Brazil, with its native sassafras species, has also been a major supplier. The extracted oil is then shipped, often through intermediary countries, to wherever the actual drug manufacturing takes place.
From Oil to Pill
Turning safrole into MDMA requires a multi-step chemical process. The classic route involves converting safrole into an intermediate compound through a chemical reaction, then combining that intermediate with methylamine (a simple nitrogen-containing chemical) to produce MDMA. An alternative path starts with piperonal, a compound with a floral smell that’s also used in perfumes and flavorings, and converts it through a different series of reactions to reach the same end product.
Both routes require lab equipment, chemical knowledge, and access to regulated ingredients. The final product is a crystalline powder that manufacturers then press into tablets, often with binding agents and colorful dyes. The pills are stamped with logos, from cartoon characters to luxury brand symbols, as a form of informal branding.
How Clandestine Chemists Adapted
International authorities placed safrole, isosafrole, piperonal, and a key intermediate chemical called PMK under strict controls starting in the early 1990s. By the early to mid-2000s, these restrictions had created genuine shortages that reduced MDMA availability across Europe. Underground chemists responded in two ways.
Some explored entirely new starting materials. Vanilla flavoring (vanillin), catechol (found in some fruits and teas), eugenol (the main component of clove oil), and piperine (the compound that makes black pepper spicy) all contain molecular structures close enough to MDMA’s backbone that skilled chemists can use them as starting points. These routes are more complex but rely on chemicals that are cheap, legal, and easy to buy in bulk.
The more common adaptation was simpler. Rather than reinventing the entire synthesis, manufacturers found unregulated chemicals that could be converted into PMK through a straightforward extra step. The first wave of these “designer precursors” in Europe were glycidic acid derivatives of PMK, with the sodium salt version showing up as early as 2013. Because these chemicals weren’t yet scheduled, they could be shipped across borders legally, then converted to PMK in the lab before proceeding with the standard MDMA recipe. Regulators have since moved to control many of these workaround chemicals, but the pattern of adaptation continues.
What’s Actually in an Ecstasy Pill
One reason the question “where does ecstasy come from” matters practically is that what’s sold as ecstasy often isn’t pure MDMA. Testing of street-level pills has identified a wide range of other active substances mixed in or substituted entirely: caffeine, methamphetamine, the cough suppressant dextromethorphan, ephedrine, cocaine, aspirin, ketamine, and synthetic cathinones (sometimes called “bath salts”). Some ecstasy tablets contain no MDMA at all.
This variability exists because ecstasy production is entirely unregulated. There’s no quality control, no standardized dosing, and no accountability. A pill’s logo or color says nothing reliable about its contents. Drug-checking services in some countries allow people to submit samples for lab analysis, and the results consistently show that the gap between what’s advertised and what’s inside can be enormous.
International Legal Status
MDMA is listed under Schedule I of the United Nations Convention on Psychotropic Substances of 1971, the most restrictive category. This classification means it’s considered to have a high potential for harm and no accepted medical use under the treaty, though individual countries set their own penalties. In the United States, MDMA has been a Schedule I controlled substance since 1985. Most countries worldwide follow similar classifications, making both the drug and its precursor chemicals illegal to produce or possess without specific research authorization.

