In 2015, one person infected with HIV joined a network of drug users in rural Indiana. Within four months, 180 people had contracted the virus.

Massachusetts health officials warned clinicians across the state about Indiana’s experience late last month after noticing an alarming trend in preliminary data on new HIV infections.

The proportion of newly diagnosed HIV infections attributable to injection drug use is on the rise, the state figures show, even as the overall rate of infection appears to be continuing a decades-long decline.

In 2014, after four consecutive years of decreases, just 30 of the 652 HIV diagnoses, or 5 percent, were the result of injecting drugs. That percentage increased to 8 percent in 2015 and 10 percent in 2016.

Through mid-December 2017, preliminary figures suggest 78 of the year’s 506 HIV diagnoses – 15 percent – were caused by drug use.

“It's not a huge number,” said Dr. Alfred DeMaria, medical director of the state Bureau of Infectious Disease and Laboratory Sciences. “But it could be the harbinger of an epidemic of HIV in injection drug users.”

The number of HIV infections attributable to drug use had been decreasing for 30 years, thanks in large part to increased access to clean needles from pharmacies and exchange programs, DeMaria said. “But then we had the opioid epidemic,” he said.

Now, more people are using drugs like the synthetic opioid fentanyl, with effects that are powerful but relatively short-lived, leading to more frequent injections. And many opioid users are of a younger generation that grew up at a time when concerns about HIV had decreased amid successes in battling the epidemic.

More than 21,000 people are living with HIV or AIDS in Massachusetts, according to state data. That’s up from less than 14,000 in 2002. Medical advances over the past two decades have allowed HIV-positive people to live much longer lives, and studies have shown those infected with the virus won't transmit it through sex if they are on the appropriate medication.

An average of 662 people were diagnosed with HIV annually between 2012 and 2016, according to the state.

“But that’s a lot,” said Gary Daffin, executive director of Boston-based Multicultural AIDS Coalition Inc. “And if we don’t continue to educate people and provide people with the tools they need … we’re going to see that number go back up.”

Those tools include condoms, clean needles and pre-exposure prophylaxis, or PrEP, a pill that can reduce the risk of HIV infection through sex by 90 percent, and through drug injection by 70 percent.

Daffin’s organization provides peer support services to people with HIV and works to prevent infections among high-risk groups including gay and bisexual men of color, women of color, and immigrants from sub-Saharan Africa and the Caribbean.

More people have been taking advantage of the group’s needle exchange program in recent years, and several people in its HIV support groups have died of overdoses, Daffin said. The latest state figures are problematic, he said, and suggest people – perhaps a new generation of drug users – aren’t injecting safely.

“We know how to prevent people from getting HIV, we know how to make sure that people who have HIV are going to live a normal lifespan,” Daffin said. “It’s just a mater of having the wherewithal and the determination to find those folks and to provide those services across the board.”

State officials stressed that their 2017 data is preliminary and subject to change. They have also been monitoring an uptick in Hepatitis C infections in recent years, particularly among young people.

There were 2,625 cases of Hepatitis C reported among people ages 15 to 29 in 2015, up from 2,283 cases in 2013 and 1,871 in 2008. The liver infection, which is treatable but can be fatal, is often spread through sharing needles.

A bill pending before the Joint Committee on Mental Health, Substance Use and Recovery would allow the state to approve sites where people could legally inject pre-obtained drugs under the supervision of health care professionals.

The bill’s co-sponsors include state Sen. Jamie Eldridge, D-Acton, and state Reps. Jack Lewis, D-Framingham, and Carolyn Dykema, D-Holliston. Local boards of health would need to sign off on any sites in their towns.

“We believe that supervised injection facilities can be an appropriate strategy and there are many people involved in advocating for them,” said John Gatto, executive director of JRI Health, which runs the RISE program in Framingham. “But I think we have a way to go before the public can embrace them, which is why we’re trying to push those conversations now.”

Advocates argue safe injection sites could reduce overdose deaths while also providing an avenue for public health professionals to make contact with drug users they wouldn’t reach otherwise, potentially steering them toward help.

With an office at 1 Grant St., RISE provides free HIV and STI testing, and helps connect HIV-positive people to health care and supportive services. The group, which runs mobile clinics throughout MetroWest, is also looking into becoming a state-approved needle exchange, of which there are roughly two dozen statewide.

Gatto said Massachusetts had been close to ending HIV transmissions among injection drug users. But the latest state figures seem to have dashed hopes that can happen in the near term.

“We had really been stemming the tide of new infections among injection drug users,” Gatto said. “And now, I think we’re seeing that trend reverse and questioning whether or not we actually in the short term can end transmissions among injection drug users.”

Jonathan Dame can be reached at 508-626-3919 or jdame@wickedlocal.com. Follow him on Twitter @DameReports