The following article first appeared on Substance.com:

Today, we think of it as the highly illegal brown (and sometimes white) powder you score from some shady dude on the corner. But heroin wasn’t always viewed that way. After its discovery in the latter half of the 19th century, it was hailed as something of a wonder drug. Heroin’s fall in status to scourge of society didn’t happen overnight, though, and the drug’s history—and our dramatically evolving views of it—took some surprising twists. What got me into this? Before my arrest in 2010 during my last semester in college, I was addicted to heroin—and oddly, I enjoyed researching it while high. Let’s just say I got a lot of research done.

1. Heroin possession and use were not always criminal. In fact, it was perfectly legal for the first 50 years of its existence, after its discovery in 1874. In 1914, the Harrison Narcotics Act made the recreational use of opiates and coca leaf derivatives illegal in the US—one of the first federal efforts to regulate nonmedical drug use. But in practice the act just meant that users now had to get the drug from a doctor. Ten years later, the 1924 Heroin Act made the drug completely illegal, even for medical purposes.

Other countries soon followed suit. Mexico prohibited heroin in 1924, Costa Rica in 1928, Poland in 1931, Spain in 1933 and Bulgaria in 1934. Although the UK made the drug illegal in 1926, doctors could—and still can—prescribe it for withdrawal. Denmark andSwitzerland also allow the prescription use of heroin for addiction treatment, while in Portugal the drug is illegal but the possession of less than a 10-day supply is not considered a criminal offense.

2. Heroin was originally called tetra acetyl morphine. Although that’s quite a mouthful, the chemical name used today—diacetylmorphine—is still pretty ungainly. Why the change? Basically, the original name was the result of a slight scientific misunderstanding.

In 1805, an uneducated pharmacist’s assistant named Friedrich Wilhelm Adam Serturner isolated opium’s active organic alkaloid compound by dissolving the opium in acid and neutralizing it with ammonia. He named his new compound morphine, in homage to Morpheus, the Greek god of dreams. Serturner published his work in 1806, but initially his findings were largely ignored. Once people finally paid attention, however, the drug caught on in a big way. Merck began manufacturing morphine commercially in 1827, and within three years Britain was importing 22,000 pounds of opium per year in order to make it.

Despite the morphine’s popularity, scientists didn’t accurately understand its structure. In fact, in 1874, when a British chemist namedC.R. Alder Wright first synthesized what we now call heroin, it was still believed that morphine had a double empirical structure. Thus, when Wright was actually adding two acetyl groups per molecule, he thought he was adding four per molecule—and so he named ittetra acetyl morphine to indicate that it required the addition of four acetyl groups onto morphine.

Then, in 1890, the German scientist W. Dankwortt tried making heroin using a different method. When he heated anhydrous morphine with excess acetyl chloride, Dankwortt discovered that morphine actually had a single empirical structure and thus only required two acetyl group (di) instead of four (tetra). That’s why today the chemical name is diacetylmorphine.

3. Bayer started selling the wonder drug under the brand name “Heroin” in 1898. Yep, that’s right, Bayer, the company that first brought us Alka-Seltzer and aspirin. For the first two decades after its first synthesis, heroin had been neglected. Then, Bayer scientist Heinrich Dreser seized on the drug’s potential. After testing it on humans, animals and himself, Dreser had it ready for widespread distribution by 1898. One year later Bayer was already producing a full ton of heroin. The company stopped making heroin in 1913, the year before the government started regulating it.

4. The narcotic’s name comes from the German word for heroic. When Bayer began testing the drug on its workers in the late 1890s, they loved it (no surprise) and said it made them feel heroic—”heroisch.” At the time, the term was used to refer to any particularly strong drug, and even before its effects were well understood, heroin’s strength was readily apparent. Hence, Bayer trademarked “Heroin” and began marketing it worldwide.

5. Heroin was once marketed to—or at least for—kids. At a time when tuberculosis was one of the top three causes of death and 30% of deaths occurred in children under age five, any substance that appeared to improve respiratory health by cutting coughing and easing breathing was bound to be popular. Thus, Bayer launched a child-focused marketing campaign. In 2011, a watchdog group called Coalition Against Bayer Dangers dug up ads from a 1912 Bayer campaign in Spain. One, which shows two unattended children reaching for a bottle of heroin, makes it pretty clear who the intended consumer is.

6. In the late 1800s, most opiate addicts were upper- and middle-class women. One of the main ways that heroin and other opiates were sold was as an active ingredient in cough syrup, which women bought for their medicine cabinets and used for almost any ailment; as a result, they ended up comprising a large portion of the addicted population. Surveys conducted between 1878 and 1885 showed that well over half of US opiate addicts were affluent women. The rate of addiction was almost triple what it would become a century later, during the so-called heroin epidemic of the mid-1990s.

7. Heroin was believed to be less addictive than morphine. In fact, at one point heroin was even used to treat morphine addiction. When Wright first synthesized heroin, he was looking for a non-addictive version of morphine. Later, when Dreser began testing the substance, he concluded that it was not habit-forming. (This error may help explain why, by the end of his life, Dreser was reportedly addicted to it himself.) In 1900, the Boston Medical and Surgical Journal wrote, “It possesses many advantages over morphine…. It’s not hypnotic, and there’s no danger of acquiring a habit.” Whoops!

9. Heroin was once massive in Egypt. Now, Egypt isn’t a place particularly associated with the drug, but in the 1920s, out of a total population of 14 million, an estimated 500,000 people—3.5% of all Egyptians—were addicted to heroin. By contrast, in 2011 only about 1.6% of Americans said they had even tried it.8. The term “junkies” was first applied to heroin users in the 1920s. As heroin’s legal status began changing in the previous decade, addicts in New York City began collecting and selling scrap metal to support themselves and their habit. They spent their days scavenging junk and thus were calledjunkies. (Before they were called junkies, they were often referred to instead as “heroinists” in medical literature.)

It all started in 1916 when cocaine and then heroin were first sold for nonmedical consumption in Egypt. Heroin was sold at rock-bottom prices and caught on like wildfire. Contractors were even paying their workers in heroin. Heroin use spread through all classes of society, peaked in 1929 and then declined due to a combination of new international regulations and the closure of three Turkish heroin-producing factories.

In 1971, two congressman reported that 15% of US serviceman in Vietnam were addicted to heroin. As a result, President Nixon created the Special Action Office of Drug Abuse Prevention to address the problem. The head of that office, Jerome Jaffe, contacted psychiatric researcher Lee Robbins to conduct a study. Robbins found even more dramatic results: 20% of soldiers self-identified as addicts. All were kept in Vietnam to dry out before coming home. When Robbins followed up with them after they had been back in the US for a year, she found that only 5% had become addicted again. By contrast, Americans addicted to heroin who dried out in the US had a relapse rate of 95%.

10. It’s widely known that heroin use was huge among American soldiers in Vietnam—but not everyone learned the right lessons from this.

One lesson of this study is that changing the physical, or at least social, environment in which addiction occurs can greatly improve treatment outcomes. Another is that the vast majority of people who have problematic use of a substance, even one as powerful as heroin, can resolve it without relapse.