BOSTON — A unique case before Massachusetts’ highest court is challenging the practice of ordering people with addiction to stay drug free as a condition of probation.

Julie Eldred was sent to jail last year after testing positive for fentanyl days into her probation for larceny. The 29-year-old with severe substance use disorder now says she was unfairly punished because her relapse was the result of a disease, not a choice.

Eldred’s supporters say punishing people with addiction doesn’t work, and even the threat can cause stress that increases the risk of relapse.

Massachusetts Attorney General Maura Healey’s office is urging the court to uphold the probation requirement. The attorney general says drug testing and sanctions help users on their path to recovery.

The court is set to hear the case Monday.