The Massachusetts Department of Correction is facing a federal lawsuit challenging its limits on opioid addiction medicine.

The American Civil Liberties Union of Massachusetts and the law firm Goodwin Procter said Friday they filed suit in Boston federal court on behalf of three people who had been prescribed addiction treatment medication prior to being incarcerated in state prison.

The organizations said the inmates were told they'd only receive their daily dose of buprenorphine for 90 days, after which it would be withdrawn.

They argue that prison policy violates the U.S. Constitution's Eighth Amendment ban on cruel and unusual punishment and the federal Americans with Disabilities Act's protections for people suffering from opioid addiction.

The organizations said the inmates are effectively being forced to go through painful withdrawal and face an increased risk of relapse, overdose, and death without their medication. They've asked the court to issue a temporary order requiring prison officials to provide the medication until the case is decided.

"The Massachusetts Department of Correction is forcing people to needlessly suffer," said Carol Rose, executive director of the ACLU of Massachusetts, in a statement. "Public officials should support people in their efforts to overcome opioid addiction, not obstruct them."

Spokespersons for the department and the state Executive Office of Public Safety and Security that oversees it, didn't respond to emails seeking comment Friday. The ACLU said the federal court has ordered other correctional facilities to provide inmates opioid treatment medication, including the Essex County jail.

It said the Federal Bureau of Prisons has also recently reached a settlement to provide methadone to an incarcerated Massachusetts woman.