This week, a Superior Court judge ruled that the town of Barnstable didn’t have the authority to shut down a needle distribution program in Hyannis. Tucked away on page 12 of the legal opinion was the judge’s observation that the Hyannis program “saves lives.”

I couldn’t agree more.

Last year, 1,008 Massachusetts residents died from opioid overdoses. In 2013, there were 888 deaths, and in 2012 there were 668. In response to this escalating crisis, Gov. Charlie Baker has proposed controversial legislation to let doctors force opiate addicts into treatment against their will if they pose a risk to themselves or others. Boston Health Care for the Homeless would like to open a “safe space” where heroin users can receive medical supervision when they are high in order to prevent overdoses. In Gloucester, instead of charging nonviolent drug offenders with a crime, police are offering addicts assistance with finding treatment.

Obviously, dealing with opioid addiction is a complex task requiring multiple prongs of attack, and perhaps, unconventional approaches such as those mentioned above. But if our goal is to save lives and end this epidemic, then we must dramatically expand the availability of needle distribution programs in Massachusetts. These programs, as the judge put it, save lives. And they do so in three ways: keeping addicts as safe as possible while they are actively using drugs; connecting them with rehabilitation services when they are ready to tackle their addiction; and training people who inject drugs, as well as their friends and other community members, about how to use Narcan, a nasal spray that reverses potentially fatal drug overdoses.

Needle distribution programs give out free, sterile syringes to injection drug users and safely dispose of their used needles. Some, such as AIDS Action Committee’s Needle Exchange and Overdose Prevention Program, also operate drop-in centers where clients can access other supplies to reduce the risk of health problems related to injection drug use, as well as free testing for HIV and hepatitis C; counseling; information and referrals for health care and substance abuse treatment; and access to Narcan.

Multiple studies have shown that these programs reduce the frequency of injection drug use among addicts and increase the likelihood that they will enter a drug treatment program. One study of a needle exchange program in Seattle, for example, found that users of a needle exchange program were five times more likely to enter treatment than those who did not use the program. It may sound counterintuitive that providing injection drug users with the supplies they need to shoot up can actually facilitate their entry to substance abuse treatment. But the reality is that most people who inject drugs are so disengaged from the healthcare system that will not seek help until a health problem is so advanced they require hospitalization. Thus, the only contact many of them have with social service providers in a nonemergency setting is within the context of needle exchange. In that sense, needle exchanges act as a “bridge to care” for the hardest-to-reach injection drug users.

Needle exchanges are also judgment-free zones that use a harm reduction model—that is, they do not seek to prevent people from using drugs, but rather to reduce the health risks associated with it in the interest of public health. Look no further than the dramatic decrease in HIV infection rates among people who inject drugs as proof that this model of harm reduction works: Since needle exchanges were implemented in Massachusetts, the rate of HIV infection among people who inject drugs has plummeted by more than 90 percent. Needle exchange programs also decrease infection rates of hepatitis C, and reduce injection-related health problems like abscesses and other conditions that could require emergency care or hospitalization. Ultimately, needle exchange programs provide pragmatic, low-threshold services to help users take steps to reduce their risks to health, and provide support with the recovery process when they are ready.

Despite all of the good they do, there are fewer than 10 such programs in the state. It is not surprising that states battling opioid addiction are increasingly turning to needle exchange programs as part of their strategies to contain the problem. Indiana, for example, implemented a needle exchange program earlier this year in response to a dramatic spike in HIV diagnoses fueled by opioid injection drug users sharing needles. Last month, the CDC released a report showing that the program has resulted in an 85 percent drop in needle sharing among clients of the exchange.

If we are to make meaningful progress in the fight against opioid addiction, we must expand the availability of needle exchange programs now so that we can open the door to recovery for the hardest-to-reach injection opioid addicts.

Carl Sciortino is the executive director AIDS Action Committee of Massachusetts.