SALT LAKE CITY — Utah has joined over two dozen states that have legalized needle exchange programs in the hopes of curbing the state's rise in illegal drug usage and the spread of diseases contracted through dirty needles.

The state's Republican governor recently signed the proposal, which all but two lawmakers in the staunchly conservative Legislature who voted on the measure approved.

"It's pretty innovative for our legislators here in this conservative state to pass something like that," Jeff Marrott, spokesman for Utah's substance abuse and mental health division, said Wednesday.

The measure signed by Gov. Gary Herbert on Friday allows public and private organizations to take used needles from anyone and provide them new, sterile ones in return.

It is expected to cost local government up to $100,000 per year.

Marrott said needle exchange programs can help to reduce deaths and long-term illnesses that result from intravenous drug usage.

Heroin is the drug that's causing health officials the most concern, Marrott said.

There were 123 heroin-caused deaths in 2014, according to the most recent data available from Utah's health department. That's nearly double the number of heroin deaths reported a decade earlier.

HIV and Hepatitis C can both be contracted through dirty needles.

Reported cases in Utah of Hepatitis C increased by about 37 percent between 2013 and 2014, the most recent data available, according to Utah's department of health. There was also a small increase in residents newly diagnosed with HIV between those years.

The law by Sen. Steve Eliason, R-Sandy, requires needle exchange programs to provide participants with information about substance abuse treatment, the spread of diseases and how to get tested.

Previous drug laws had made it illegal to have needle swaps in the state.

Eliason said he thought it could be difficult to get the Republican-dominated Legislature to pass his bill, but it met little resistance after his colleagues learned about the success of needle swap programs elsewhere.

"This is humane, it's fiscally responsible and it doesn't encourage drug abuse, but rather serves to get people into treatment," Eliason said.

Needle exchange programs will be required to file reports every two years so Utah can keep tabs on such information as the impact the program is having on blood-borne infections and how many people are taking advantage of the program.

Utah Medical Association CEO Michelle McOmber said the reporting requirement is key because it allows the state to see if the programs are working. She said her association supported the legislation.