PROVIDENCE, R.I. — An expanded program to treat prisoners for opioid addiction helped lower the number of accidental drug overdose deaths in Rhode Island in 2017 after years of steady increases, state health officials said.

The roughly 4 percent decrease in accidental overdose deaths represents a "small bit of momentum" that's energizing, said Health Department Director Nicole Alexander-Scott. There were 323 last year in the state, down from 336 in 2016, according to figures released Monday.

Andrew Klein, a senior criminal justice research analyst, uses Rhode Island as a model when advising other states about residential substance abuse treatment.

"They're showing that you can introduce these addictive medications in a prison environment without all hell breaking loose," said Klein, of Advocates for Human Potential, Inc. in Sudbury, Massachusetts.

Rhode Island began screening all prisoners for opioid addiction in 2016. The state provides the three federally approved medications for opioid addiction to those prisoners who want and could benefit from the treatment.

Prison systems with treatment programs typically provide only one medication to some prisoners. Prior to 2016, Rhode Island provided only methadone.

About 8 percent of the prison population in Rhode Island is participating. When they are released from prison, they have the option of transferring to a community-based treatment program and are also given a supply of the overdose-reversing drug naloxone.

The treatment program was expanded to give people a better chance at recovery, said Lauranne Howard, coordinator of substance use disorder services at the Rhode Island Department of Corrections.

The Department of Corrections uses a quick-dissolving film form of one of the medications, instead of a pill, as one way to prevent inmates from giving the drugs to others for any illicit use, Howard said.

Researchers from Brown University and the University of North Carolina at Chapel Hill found that the addiction treatment program was leading to a drop in post-incarceration overdose deaths. They published a study in February in the Journal of the American Medical Association Psychiatry.

Though overdose deaths decreased overall last year in Rhode Island, deaths from the powerful synthetic opioid fentanyl increased by about 5 percent. There were 205 fentanyl-related deaths.

Democratic Gov. Gina Raimondo created a task force to prevent opioid overdoses in 2015. The state has made naloxone more readily available and taken other steps to combat the problem. Alexander-Scott is currently working with municipalities on developing local overdose prevention plans.

Nearly 1,700 people died of an accidental drug overdose in Rhode Island from 2011 through 2017.