Republican lawmakers in North Carolina have officially legalized needle and syringe exchange programs across the state in order to combat rising hepatitis C virus (HCV) infection and incarceration rates linked to the region’s ongoing heroin epidemic, ABC News reports.

Gov. Pat McCrory approved the new law on Monday, despite objections from many conservative members of the state’s General Assembly who argued that such programs helped facilitate, not stop, addictions. However, McCrory and the majority of state representatives argued that something needed to be done to combat the ripple effects of opioids on communities across the state.

According to local reports, between 2010 and 2014, heroin overdose deaths in North Carolina increased fivefold, and new hepatitis C cases nearly tripled. Side effects of the state’s opioid epidemic include major cost increases to North Carolina’s Medicaid program and a huge influx of injection drug users into the state’s justice system.

The new needle exchange provisions will allow registered organizations to provide drug users with clean hypodermic syringes and replacement needles as long as no public funds are used to purchase them. Volunteers, workers and participants will not be subject to drug-related charges. The programs will also help refer participants to addiction treatment.

Local lawmakers also argue that the programs will increase public safety, because they place a value on the safe disposal of dirty needles, rather than forcing addicts to discard them in parks, streets and graveyards, where law enforcement and citizens could accidentally get stuck.

North Carolina’s syringe exchange was legalized after a major push by state lawmakers to toughen laws around prescription drug access over the last few years, which has driven many opioid addicts to heroin. So far, at least 20 other states have explicitly legalized needle exchange programs under state law to combat this unintended effect.