BOSTON (AP) — The decision years ago to use dogs in Massachusetts prisons to search visitors for drugs caused uproar among advocates and family members of those behind bars. Now the state's highest court is wading into the fight.

The Supreme Judicial Court early next month will consider whether the Department of Corrections overstepped its authority when it implemented the policy in 2013 without giving the public a chance to weigh in.

Advocates for prisoners and their relatives have been fighting the use of drug-sniffing dogs for years, arguing the searches are demeaning, could discourage people from visiting and unfairly pushes the blame for the prison drug problem onto families.

"People don't want to be treated like suspects," said Lois Ahrens, a prisoner advocate and director of the Real Cost of Prisons Project. "They aren't the people who are convicted."

The Department of Correction says it hasn't received any formal complaints from visitors about the policy. Prisons officials say the dogs — Labrador retrievers and German shorthaired pointers — aren't aggressive or intimidating. The leashed dog walks past the line of visitors and sits down when it detects drugs. That person then faces additional searches or else can't enter the prison.

Between 2013 and 2017, prison officials found drugs on visitors nearly 170 times, according to data provided by the department.

"This case is litigated against the tapestry of a deadly opioid crisis that continues to plague the commonwealth," an attorney for the department said in court documents. "Addressing opioid addiction is a public health and criminal justice imperative."

The dogs are also used to search prison officers and other staff, the department said.

At issue before the Supreme Judicial Court when it hears the case on Jan 8. is whether the department unlawfully implemented the policy by failing to go through a regulatory process that would include a public hearing.

A lower court judge last year sided with the department, saying that the commissioner has a "duty to institute policies that are effective in preventing the smuggling of contraband in the prison facilities and he is empowered to use the full extent of his statutory power to accomplish this goal."

But the American Civil Liberties Union of Massachusetts and Prisoners' Legal Services of Massachusetts, which sued the department in 2014, says the public should be given a chance to share their worries and recommended change to the policy.

"People feel like they want to have the opportunity to formally express their concerns about the use of these dogs. That has been denied to them," said James Pingeon, litigation director for Prisoners' Legal Services of Massachusetts.

___

Follow Alanna Durkin Richer at http://twitter.com/aedurkinricher. Read more of her work at http://bit.ly/2hIhzDb.