BOSTON (AP) — A Massachusetts jail must provide methadone to a man recovering from opioid addiction, a federal judge in Boston has ordered.

U.S. District Judge Denise Casper, in a preliminary decision Monday, said 32-year-old Geoffrey Pesce would likely prevail in his civil lawsuit against the Essex County House of Correction in Middleton.

The Ipswich man, who plans to plead guilty, expects to face 60 days in jail for violating his probation and driving on a suspended license. He argues in his lawsuit that the jail's policy of denying certain addiction medications to inmates violates the Eighth Amendment and the Americans with Disabilities Act.

Pesce argues that the jail's policy runs counter to his doctor's recommendations for dealing with his opioid addiction. It would also force him to deal with the pain and discomfort of drug withdrawal, he argues.

Pescesays he's been taking methadone daily since 2016 because he hasn't been able to stay sober using other addiction medications.

Essex County Sheriff Kevin Coppinger said his office is weighing its options as the order could have "far-ranging effects" for correctional systems.

"In a prison setting, administering these drugs raises many security, logistical and fiscal concerns, that are not issues for individuals who are not incarcerated," he said in a statement.

The American Civil Liberties Union filed the lawsuit in September on Pesce's behalf. The civil rights organization has filed similar lawsuits in Maine and Washington state.

Most correctional facilities in the state do not offer methadone to inmates; an exception is typically made for pregnant women already on methadone since withdrawal can be harmful to the child.

Read more: Rhode Island Prisons Push To Get Inmates The Best Treatment For Opioid Addiction

But more jails and prisons nationally are starting to provide methadone and other addiction medications to inmates.

Massachusetts lawmakers this year required six county jails to start offering more medication options by next September.

Essex County wasn't one of them, but the jail does offer inmates an injection of the addiction medication naltrexone shortly before they're released.