The federal government will have to pay thousands of prison inmates placed in solitary confinement for long periods a preliminary $20 million for breaching their rights, a Superior Court judge ruled on Thursday.

The decision, which comes without a full-blown trial, is the latest in a string of similar rulings across Canada that have gone against the government and are now at various stages of appeal.

“The Correctional Service operated administrative segregation in a way that unnecessarily caused harm to the inmates,” Justice Paul Perell said in his ruling. “Class members suffered harm because of a systemic failure.”

Story continues below advertisement

Administrative segregation involves isolating inmates for safety reasons where authorities believe there is no reasonable alternative. Prisoners spend up to 22 hours in small cells without any meaningful human contact or programming.

Critics argue among other things that the practice can cause severe psychological harm and amounts to cruel and unusual punishment, facts which Perell — and other courts — have accepted.

“Many of the administrative or disciplinary cells are very poorly maintained. They are filthy and unsanitary,” said Perell, who noted the exercise yard for such inmates at the Edmonton Institution resembled a dog kennel.

The representative plaintiff in the current case, Julian Reddock, launched the action in March 2017. Reddock, who said he sometimes spent days without leaving his cell, said he binged on an anti-anxiety drug.

“All I wanted was to pass out cold for as long as possible, again and again,” Reddock testified. “It was all I could think to do to cope with the hopelessness of not knowing they would let me out.”

One witness, Jeffery Candanay, testified to being segregated for more than 15 days on more than a dozen occasions. One placement lasted almost two years.

The case, certified on consent as a class action last year, takes in almost 9,000 inmates placed in isolation after March 3, 2011 for more than 15 days at a time.

Story continues below advertisement

In his ruling, which runs more than 100 pages and is based in part on 22,500 pages of evidence, Perell found the government had no reason to run the system the way it did, a point underscored by recent legislation doing away with solitary confinement.

“Even if some form of segregation were necessary to ensure the safety or security of the penitentiary and its population, there never has been an explanation and hence no justification for depriving an inmate of meaningful human contact,” Perell said. “This form of segregation is not rationally connected to the safety of the penitentiaries.”

Perell found an absence of independent oversight and the lengthy placements breached the inmates’ rights in that it can cause a wide array of serious effects, ranging from anxiety and hallucinations to delusions, panic attacks and psychosis.

“An inmate who is placed in administrative segregation is cruelly and unusually treated once the placement is more than 15 days,” he said.

The $20-million award for vindication and deterrence includes compensation — $500 for each placement longer than 15 days — of about $9 million. The money is to be shared equally among class members, who can still claim punitive and other damages after proving their individual harm, Perell said. He declined to award punitive damages.

The justice said he decided to forge ahead with the case and issue his judgment given the array of other cases before the courts.

Story continues below advertisement

“Since my decision in the immediate case will be appealed by one or the other or both of the parties, I felt it preferable to decide the Reddock case promptly, so the appeals of these interconnected cases, with their very similar and factual footprints, could, if possible, be heard together.”

Our Morning Update and Evening Update newsletters are written by Globe editors, giving you a concise summary of the day’s most important headlines. Sign up today.