Chelsi Cheatom of Trac-B Exchange demonstrates how to use a needle vending machine at a health center in Las Vegas. (ELIZABETH BRUMLEY/LAS VEGAS REVIEW-JOURNAL VIA ASSOCIATED PRESS)

Las Vegas will be the first American city to offer a needle exchange program through vending machines. Officials hope easy access to free and clean needles will reduce the spread of HIV and hepatitis B and C among intravenous drug users.

Users will be able to get clean needles from three machines starting in May. The needle kits are free, but people who want to use them will have to fill out a form and get an ID number to track their use.

At least one of the machines will be located at a counseling center where users will be able to talk to professional counselors about addiction treatment.”

Needle exchange programs were developed in Europe in the 1980s as a way to discourage sharing of needles and to prevent the spread of disease. The concept has faced policy and funding challenges in the United States, but recently some local leaders have decided they want to go even further and offer spaces where users can take their drugs under medical supervision and without fear of arrest.

Though these “safe injection sites” exist in 27 cities around the world, there are none in the United States, where there were an estimated million heroin users in 2014.

That could be changing, though: King County, home to Seattle and 2 million people, announced plans for such sites in January.

Proponents of the injection sites argue that addicts will use heroin regardless of its legality and that opening a safe place to do drugs can drive down crime in urban areas, prevent overdoses and help guide users toward drug treatment and other health care.

Opponents of the sites say that it is never wise to condone drug use and that safe injection locations could violate the federal Controlled Substances Act, which prohibits drug possession as well as operating a place where people use drugs.