HALIFAX -- Experts in privacy and civil rights are raising questions about a police news conference that identified 27 men caught in a Cape Breton prostitution sting, saying the move amounted to unnecessary "public shaming."

"Public shaming is not something that our justice system should promote ... (and) when you release names to try to deter others, that sounds like public shaming to me," said Abby Deshman, spokeswoman for the Canadian Civil Liberties Association.

"Deterrence is a feature of our criminal justice system, but we usually leave that to the sentencing process."

Last week, provincial court Judge Brian Williston rejected a legal challenge from one of the accused, saying police have the discretion to release personal information to the media, so long as it does not jeopardize a fair trial.

However, the lawyer for John Russell Mercer, 73, argued in court that the news conference last September was akin to "locking someone in the stocks" -- a form of public humiliation that violated his client's rights under Section 7 of the Charter of Rights and Freedoms.

But the judge disagreed, saying the information released by Cape Breton Regional Police was "limited to what was already accessible to the media and the public."

Deshman said that line of reasoning doesn't recognize the impact of holding a news conference to draw attention to the accused.

"It's a nuanced difference, but in practical effect it's very important to distinguish between open court proceedings and publishing something on the Internet," she said in an interview.

"Absent some risk to public safety, just putting people's names out there who haven't been convicted of any crime yet really has an enormous impact on these individuals' lives and livelihood."

As well, Deshman said the damage to reputations can't be repaired if charges are later withdrawn or not guilty verdicts are recorded.

Police Chief Peter McIsaac flatly rejected the assertion that his department was involved in public shaming.

"Honestly, I think that's unfair," he said in an interview. "We do press conferences on any type of major investigation."

The problem with prostitution in downtown Sydney had reached the point where police had to launch a major operation, he said.

"I was fielding phone calls and having meetings with business people complaining about the activity going on downtown," he said. "There were tourists from cruise ships who were being accosted ... as well as people in banks and businesses."

More importantly, sex trade workers saddled with addictions and mental health issues were being subjected to a great deal of violence, he said.

"I feared that we were going to have someone go missing or even worse," McIsaac said, adding that the seriousness of the problem meant police had to act quickly and alert the public.

"We're not in the business of publicly shaming anybody. We're in the business of public safety. The media were calling the courthouse even before we (laid charges) ... and were looking for the names. We don't make the decision to print the names ... If it acted as a deterrent, so be it."

David Fraser, a leading Internet, technology and privacy lawyer in Halifax, said Cape Breton Regional Police should have waited until they had convictions before holding a news conference.

"As soon as that information is the subject of a press conference ... that's something that will take on a life of its own and will have a level of permanence online -- and that wouldn't be the case with something just sitting in a court file," he said.

"That information, which would have been buried in the paper age, all of a sudden is immediately accessible. It becomes part of your unofficial, permanent record that could follow you around for quite some time."

Fraser said it's clear from the judge's decision that police worked diligently at reaching out to sex trade workers to deal with a persistent problem.

As well, Fraser said he can understand police may have felt a sense of urgency in drawing attention to the sting operation, given the fact that landing convictions could take more than a year.

But, he said "I'm still left with a bad taste in my mouth following what the police did."

Some police services in the United States have taken public shaming to a new level by routinely posting on Facebook the booking photographs of people charged with minor crimes.

Those photos are typically taken down after a short time, but some show up on the website Mugshots.com, where it can cost between $400 and $1,800 to have them removed.

Critics in the U.S., including the American Civil Liberties Union, have said the practice amounts to punishment of individuals who have not been convicted of a crime.

"We're uncomfortable with law enforcement using shame tactics before people receive due process in a court of law," Lee Rowland, a staff lawyer with the organization, told The New York Times in June 2015. "It's flatly inappropriate."