Julie Eldred has been struggling with addiction to opioids for more than a decade and she says the criminal justice system punishes her for it.

Eldred, a part-time pet caretaker in Acton, Mass., was put on probation last year for theft. She knew staying drug-free would be tough — especially at first, when she was going through opioid withdrawal. But, she says, she didn't have much of a choice.

"I was in the midst of active addiction, so I was actively using. But you're forced to go into this saying I'll be drug-free or you go to jail," Eldred says.

She complied with her probation conditions, she says — she found outpatient treatment, addiction medication and a therapist — but she failed a drug test. Eldred told her probation officer that she had just started treatment and had relapsed, but was now back on track.

Eldred says her probation officer didn't care.

"She didn't look at that picture," Eldred says. "She didn't look [to see] that I had just gotten started getting everything in order. She just saw that I had a 'dirty urine,' and she just sent me in front of the judge to go to jail."

The judge sentenced Eldred to jail for the probation violation; Eldred says she received no treatment.

"I had a cellmate in there for murder, but she wasn't sentenced yet," Eldred says. "You're with people who know they're going to be sentenced and they know they're going to be in there a long time, so they don't care. There is a lot of violence — girls will jump you. It's scary."

Ten days later, Eldred was released from jail when her lawyer found a bed in a residential treatment facility. That lawyer — Lisa Newman-Polk — brought Eldred's case to Massachusetts Supreme Judicial Court, arguing that the courts should not punish people for having the disease of addiction.

"This idea that a court can order a person to stop using — with the threat of punishment — is not grounded in reality," Newman-Polk says. "If it worked to punish people for addiction and relapse we would have a cured nation."

Newman-Polk argues that courts should take into account scientific research about addiction, and apply it in practice — much as courts have done with the science about brain development and juvenile offenders. She says addiction is a medical condition, so it's unconstitutional to incarcerate someone for relapsing — because that's part of the disease.

"An order to be drug-free is an order that a person with a substance use disorder needs to be in remission or cured of addiction. It's not practical or reasonable, in view of what we know about the brain science and what we know about addiction," Newman-Polk says.

The science of addiction is mentioned in all the legal briefs filed in this case — many focus on what research says about how much control patients like Eldred have over their drug use, and whether consequences like jail actually motivate patients to stop using.

A brief from the Massachusetts Medical Society says relapse is a symptom of addiction that needs to be treated, not punished.

"Even Lindbergh bounced down the runway a couple of times before he became airborne," says Massachusetts Medical Society President Dr. Henry Dorkin, "and we would not want to incarcerate people at the first sign of relapse if we're treating this as a chronic disease."

But the opposing briefs argue that there is not consensus about whether addiction is a brain disease that leaves someone powerless over drug use. The National Association of Drug Court Professionals says supervision and drug testing help keep people in recovery. It says specialty drug courts are effective and already work to get help for addicted defendants, rather than incarcerate them. It warns the Massachusetts court not to allow "any particular theory of addiction to influence its decision."

One of those writing on that side is Gene Heyman, a senior lecturer in psychology at Boston College. He cites studies that say that many people stop using drugs and alcohol on their own — oftentimes because they face negative consequences if they don't.

"The empirical question at stake is, if you ask someone not to use drugs and you provide a reason not to use, can the person respond ?" Heyman says. "And the data say yes they can — they can stop using drugs."

The Massachusetts attorney general points out that Eldred was on probation for theft — and that she did eventually go into drug treatment because otherwise she would go to jail.

During the state's supreme court hearing on the case this month, the justices asked tough questions of both sides. Justice Barbara Lenk asked Newman-Polk where judges should draw the line if someone can't control their behavior.

"Now, if somebody didn't have the ability to resist the urge to use drugs, how is it that she could resist the urge to commit other petty crimes in order to support her drug habit ? How is it that she could have the self-control to continue in a treatment program that presumably doesn't want her to use drugs?" Lenk asked.

Crimes should be punished, Newman-Polk responded, but committing crimes is not a symptom of addiction. Maria Granik, a Massachusetts assistant attorney general, argued for the state, saying that addiction is not a defense for a probation violation or for criminal responsibility in general. Granik also argued that incarceration is one tool judges can use if necessary.

But what if a judge decided to use the probation violation to sentence Eldred for the underlying crime of larceny, Massachusetts Supreme Judicial Court Chief Justice Ralph Gantz asked Granik.

"What you need to come to grips with — and I don't hear it frankly," Gantz went on, "is, is it appropriate for a judge under these circumstances, recognizing that relapse routinely occurs in these circumstances, to impose a two-and-a-half-year sentence in the House of Correction for her probation violation?"

"I don't think we could go that far," Granik answered.

Gantz says the high court will likely issue guidelines for all courts so judges can determine how to handle what has become a revolving door in the criminal justice system for those addicted.

"This is a really challenging issue, and each side needs to come to grips with it, because judges have to do this each and every day," Gantz says.

The Massachusetts Bar Association expects the high court's ruling will cause state lawmakers to fund more addiction treatment. Martin Healy, the association's chief legal counsel and chief operating officer, believes the ruling will set a precedent.

"It is probably going to be one of the most important cases that our court will bring down — over the last decade," Healy says. "And I think it will result in some dramatic changes to the way that society treats addiction."

As for Julie Eldred, she is no longer on probation and says she's committed to working on her recovery.

"Hopefully this is it," Elred says. "But I can't say that I won't ever relapse again. Right now I feel strong, but this is a lifelong journey. Some people think you get clean and that should be it. It's not."

Copyright 2017 WBUR. To see more, visit WBUR.