As the number of prescriptions for opioids like Vicodin skyrockets, law enforcement authorities say more patients are becoming addicted and then moving on to heroin use.

Over the past two decades, a disturbing trend has come to the attention of law enforcement officers, substance abuse counselors, and healthcare providers.

The United States has a heroin problem.

Over just six years, the number of people trying heroin for the first time nearly doubled from 90,000 in 2006 to 156,000 in 2012.

In 2000, 1,842 people died of a heroin overdose. By 2014, that number had quintupled to 10,574.

The White House recently noted that more Americans die from drug overdoses than from motor vehicle crashes each year.

In fact, the number of people who died from drug overdoses in 2014 — approximately 47,055 — was greater than the number of people who died in the peak year of the AIDS epidemic in 1995.

“Heroin use has been increasing markedly by all measures. Abuse rates are going up. Death rates are going up. The treatment rates are going up,” Dr. Wilson Compton, deputy director of the National Institute on Drug Abuse (NIDA) told Healthline. “It qualifies as an epidemic by anyone’s definition.”

A number of theories exist to explain the rise in heroin use in recent years, including increased supply and demand, and drug trafficking.

But most public health officials and a growing number of policymakers now acknowledge that the country’s rise in prescriptions for opioid-type painkillers such as Vicodin and Percocet play a major role.

“Most of the heroin users now, their first opioid exposures are the prescription drugs. That’s true for at least 80 percent of today’s heroin addicts,” Compton said. “That’s very different than 30 or 40 years ago, when the first opioid was heroin.”

Read More: Concerns Raised Over Prescriptions Given to Seniors »

More than 60 percent of 2014’s drug overdoses were related to opioid use.

Heroin and some legal painkillers like morphine and codeine are isolated from the opium poppy. These naturally derived painkillers are sometimes referred to as opiates.

The term opioid, once used to denote that a substance was created synthetically, is now a catch-all term for any drug that produces analgesic effects by acting on opioid receptors in the body’s nervous system.

Any opioid, whether synthetic or naturally derived, functions in the same way. The body’s response to pain is actually a process of stimulus and response: something sharp or hot or blunt or inflamed alerts nerves in the body to send a signal to the brain. The brain then sends back a signal to the body that the stimulus is painful.

While the neuronal pathway of opioids is somewhat complex, the drugs essentially inhibit the brain’s response to painful stimuli. The stimulus makes it up to the brain, but opioids block the “ouch” response that’s headed back to the body.

“The brain doesn’t distinguish between heroin and prescription opioids,” Compton said. “The majority of the impact of opioids are within the brain itself.

It doesn’t change the pain itself, but it changes the perception of it. The pain doesn’t go away. It just doesn’t bother you.”

Legal prescriptions for opioids are useful for acute pain like broken bones, nasty lacerations, or post-surgical pain.

But if opioids are used over time for chronic conditions, tolerance and dependence can develop.

Tolerance is the need for higher and higher doses to achieve the analgesic effect. Dependence, on the other hand, is the body’s need for routine and regular doses of a substance to prevent a withdrawal syndrome.

Addiction, a more complicated psychological diagnosis, is marked not only by the physical havoc that tolerance and dependence wreak on the body, but the emotional and social toll that results from prioritizing drug use over social relationships and personal responsibilities.

Read More: Emergency Rooms Facing Shortages of Important Drugs »

Dr. Peter Grinspoon, a family physician in Massachusetts and author of the recently released book Free Refills, understands addiction firsthand.

He was training as a medical student at Harvard when his girlfriend’s physician father sent along a med school care package that included “a big box of Vicodin,” he remembers.

“We, of course, looked up all the medications. And Vicodin said, ‘Warning: causes euphoria and a false sense of well-being,’” he told Healthline. “We were destined to try it. Right? I mean, this is the worst thing to write if you don’t want people to try it.”

Throughout med school, his residency, and into his practice as a family doctor, Grinspoon continued to abuse prescription opioids.

“It’s extremely high stress, being a doctor, combined with the unlimited access of prescription opioids for physicians,” he said. “That’s a very bad combination — stress and access.”

In February 2005, state police and Drug Enforcement Administration officers, acting on a tip from a local pharmacist, showed up at Grinspoon’s office. He lost his medical license, went to rehab, relapsed several times, and finally got clean in 2007.

Grinspoon acknowledged that his addiction caused him to make bad decisions not just for himself, but also for his patients. He admits to making deals in which he’d get a share of a patient’s prescriptions as well as stealing drugs from terminally ill patients.

“The patients that I crossed the boundaries with, and that we shared prescriptions … I think I facilitated their addiction or their diversion of controlled substances,” he said. “What I was prescribing, I don’t know if they were taking them or selling them.”

Now back in practice, Grinspoon’s perspective on opioids and addiction is informed not just by his own fall from grace, but the addiction stories of others he met in recovery and rehab.

“My addiction was stopped before I progressed to heroin,” he said. “A lot of people get addicted to the pills and then progress to heroin because they can’t afford the pills.”

He’s had patients who were addicted to heroin, and has also lost patients to overdose. Grinspoon noted that the warning signs for abuse can be very non-specific.

“There were a couple really together-seeming, clean cut patients that I had no idea. I was just astounded to find out that they were using heroin every day,” he said. “I feel like I have a pretty good detector for this, but I didn’t detect it at all.”

Read More: Spending $100,000 a Year on Prescriptions to Stay Alive »

Grinspoon and Compton both acknowledge that prescribers of opioids have an important role in preventing addiction. But the pathway of addiction is not as straightforward as it might seem.

“Most of the people dying from overdose and most of the people misusing these are not those to whom the prescription is written,” Compton said. “It’s part of environmental availability. People are sharing the pills, or they’re stolen or diverted.”

The recent rise in opioid and heroin coincides with a push in the late 1990s and early 2000s by the pharmaceutical companies’ introduction of new formulations of prescription opioids.

The availability of these drugs was fueled in part by a misleading marketing campaign by OxyContin maker Purdue Pharma, which promoted the extended-release form of the drug as less addictive than other opioids.

In 2007, Purdue Pharma paid $634 million in fines for its false claims. But the damage had been done. In 1991, 76 million prescriptions were written for opioids. By 2011, that number had nearly tripled to 219 million — enough to give one bottle of pills to every American over the age of 15.

A prescription for painkillers obviously doesn’t evolve into heroin addiction for everyone with an ACL tear. Even those who fall into the dependence and addiction categories have limited use of heroin. Just 4 percent of people classified prescription opioid abusers progress to heroin use within five years, according to NIDA.

Still, addiction to opioid painkillers is a major risk factor for heroin use. Marijuana users are three times more likely to be addicted to heroin than people who don’t use drugs. Cocaine users have a 15-fold risk.

But people addicted to prescription opioids are 40 times more likely to become addicted to heroin, according to the CDC.

“They start off with pills, and then there’s a transition to heroin. Their friends and drug-using social network may help them realize that it may be available, and cheap.” Compton said. “Or they find that they’re unable to obtain the pills as readily.”

The question of access and cost is at the crux of the transition from pills to heroin.

“In many markets, on an opioid/milligram equivalent, [heroin] is cheaper,” Compton said.

Many people who abuse opioids remain wary of the stigma attached to heroin. But Grinspoon points out that addiction is a disease, and that stigma and fear might not mean much to a person whose life revolves around getting their next fix.

Grinspoon says his access to pills may have played more of a role in preventing him from trying heroin than any moral code or perception of rock bottom did.

“I could afford the pills. I was a doctor, and I was getting a lot of the pills for free,” he said. “Heroin has such a stigma that I’m not sure I would have lowered myself to that as a physician. I think that might have been another line that I would never have crossed. But who knows?

With addiction you just don’t know … the addiction takes over the part of your brain that makes good decisions. After a while it certainly feels like the addiction is calling the shots. Toward the end, you become less and less in control of your behaviors.”

Compton says that fear and reluctance to move to heroin is healthy, but he is wary of classifying heroin addiction as worse than opioid addiction.

“There’s still many more people dying of drug overdoses related to the pills than there are related to heroin,” he said.

Read More: Are New Anti-Drug Programs in Schools Getting Better? »

Across the country, acknowledgement of the heroin epidemic, and the role of prescription opioids in combatting it, has gained the attention of lawmakers.

Earlier this month, the Obama administration proposed a $1.1 billion initiative aimed at treating opioid addiction.

The National Governors Association recently decided to create guidelines aimed at reducing the type and number of prescriptions — a move that might put prescribers in a tough position but has garnered bipartisan support.

The U.S. Department of Health and Human Services targeted three key efforts last year: increased training for health professionals and prescribers; access to naloxone, an overdose-reversal drug; and expansion of Medication-Assisted Treatment (MAT), a type of recovery treatment that includes daily administration of opioid-like drugs that’s proven to reduce withdrawal and relapse.

In small towns and big cities, efforts to curb the tide of opioid addiction have led to innovative solutions.

Once seen as criminal activity, hard drug use and illegal use of prescription drugs is now fostering conversations of addiction as a disease, and less harsh penalties are seen as a means of supporting recovery.

In Gloucester, Massachusetts — a community that has seen staggering increases in opioid abuse and overdose rates — police have initiated a program that allows addicts to come to the police department for help accessing recovery services.

They will not be arrested or charged with criminal activity. Instead, they’ll be taken to a nearby hospital and paired with a volunteer who will help them access immediate treatment.

In the Yale-New Haven Hospital Emergency Room, a study found that opioid-dependent patients who were given access to buprenorphine (one of the opioid-like MAT drugs promoted by HHS) were significantly more likely to be in recovery treatment after 30 days than those who were simply referred to treatment.

Naloxone, an opioid overdose reversal drug, is now carried by many police officers and first responders throughout the country. In addition, CVS and Walgreens recently announced it will be available without a prescription in Ohio.

Twenty states and Washington, D.C., have now enacted so-called Good Samaritan 911 laws that grant amnesty to anyone who seeks medical help for a person who has overdosed — even if drugs are present or the caller is under the influence.

These developments are not without their criticisms.

Over 10 years, heroin use increased 114 percent in the white population and 77 percent in the middle-class income bracket. Some say that the conversation about drug use as an addiction, and the reduced penalties that come with it, are only happening because white, middle-class people are now affected.

“One the one hand it seems profoundly unfair that minorities were treated so poorly with this terrible disease,” Grinspoon said. “On the other hand, the fact that the paradigm is shifting is a great thing for everybody. Because this is the way addiction should be treated: as a disease, not as something that should be punished.”

Compton said that NIDA has been a longstanding proponent of combining both public health and criminal justice efforts to get people the services they need, and points out that there is a lot of overlap among addicts and prisoners — and that preventing a drug relapse is not so different from preventing recidivism.

“Public heath operating all by itself struggles with our patients dropping out of treatment. Criminal justice suffers from similar issues. Even if you bring someone into prison, they’re at extraordinarily high risk when they’re released if you haven’t provided treatment,” he said. “For those who engage in illegal risky, dangerous behavior — which is not that rare in drug abusing populations no matter what community they’re from — it’s by working together that we can represent the future of providing the best outcomes.”