Most people who inject illegal drugs don’t always use clean needles, and risk catching HIV and hepatitis as a result, U.S. health officials said Tuesday.

But more than half use a clean syringe at least sometimes, which is progress, the Centers for Disease Control and Prevention said.

A CDC analysis from 22 U.S. cities found that 54 percent of people who inject drugs had used a needle exchange program in the past year — up from 36 percent in 2005. But a third said they had shared a needle at least once within the past year.

That's not good enough, the CDC said.

"The prescription opioid and heroin epidemics are devastating families and communities throughout the nation, and the potential for new HIV outbreaks is of growing concern," CDC director Dr. Thomas Frieden told reporters.

Activists in Indiana, where drug abuse has caused a small outbreak of the AIDS virus in recent years, say they know one reason why many users still are not getting clean needles: Some state governments are making it hard to do so.

Even though Indiana government officials reluctantly eased a ban on syringe exchange programs at the CDC’s urging, they provided no funding for them and are making advocates jump through hoops to get programs started.

The issue pits well-meaning lawmakers against doctors and other public health experts, with a confused public in the middle. CDC and other experts say decades of studies show needle exchange programs work not only to stop the spread of disease, but to help people stop their abuse of drugs such as heroin and other opioids.

“Oftentimes people are against needle exchanges because they believe that people who use drugs have made choices and should suffer certain consequences of those choices."

Many people, however, are worried about encouraging a deadly practice.

"We do understand that when people first hear about syringe exchange programs, they wonder why anyone would do that," Frieden said in a telephone briefing.

"The science shows that syringe service programs work. They save lives and money. Study after study shows they don’t lead to increased drug use or crime," he added.

And then there are moral judgments.

"Oftentimes people are against needle exchanges because they believe that people who use drugs have made choices and should suffer certain consequences of those choices," said Chris Abert of the Indiana Recovery Alliance, one of the community groups improve access to exchanges.

HIV and hepatitis C both spread via shared needles. In the U.S. 3,900 people become infected each year with HIV because of shared needles — 9 percent of new infections.

"In recent years, injection drug use has also contributed to a 150 percent increase in acute cases of hepatitis C infections," the CDC said.

Related: Surgeon-General Says 78 Die a Day from Opioid Abuse

Studies have found that if people can easily get clean needles to use, they’ll wait longer in between fixes. And getting into an exchange program takes them one step closer to getting treated for their drug abuse problems.

Needle exchange programs in big cities are helping, and fewer blacks and Hispanics are becoming infected that way. The spread of both HIV and hepatitis C is now becoming more common in whites, the CDC said.

"Annual HIV diagnoses among black and Hispanic/Latino people who inject drugs were cut in half between 2008–2014, but diagnoses among white people who inject drugs dropped by only 28 percent," the CDC said.

"One reason may be that fewer blacks and Hispanics/Latinos are sharing needles and syringes, while whites are more likely to share them," the CDC said.

It took an epidemic in Indiana to convince officials there.

Related: HIV Epidemic in Indiana Tops 100 Cases

Last year, Indiana Gov. Mike Pence — now the vice president-elect — declared a public health emergency and temporarily waived the state's ban on needle-exchange programs.

Yet it’s been slow going to get clean needles to the people who need them, Abert said.

“You have to prove you are already in midst of an epidemic of HIV, which is absolutely insane health policy. It’s just a recipe for disaster.”

"We have no money allocated from the state,” Abert said.

"It is a very complicated process to get a needle exchange up and started. You have to go through a lot of work to get one going,” Abert said. "You have to prove you are already in midst of an epidemic of HIV, which is absolutely insane health policy. It’s just a recipe for disaster."

Related: CDC Says Urgent Action Needed in Indiana HIV Epidemic

Groups like Abert’s cobble together funding from philanthropies, some local sources, and donations to provide clean needles and other equipment so that users don’t share.

And there are other roadblocks. "It is still illegal in Indiana to have a syringe without a prescription," Abert said.

"All of our participants, all of our volunteers, could be arrested at any moment," Abert said. "They didn’t change the criminal code."

Carrie Ann Lawrence of the Indiana School of Public Health says even when counties want to start needle exchange programs, they usually lack even the staff needed to apply for the necessary funding.

"There is absolutely no resource allocation attached to our syringe resource legislation," Lawrence said.

Indiana’s epidemic reflects what the CDC found: 43 percent of white drug users surveyed in 2015 said they shared needles.

"The injecting drug users that we saw in Scott County were poor, Caucasian, from rural communities, and with low education levels oftentimes," said Lawrence, who’s studied the drug abuse issue in Indiana.