Inmates subjected to extended periods of solitary confinement have been known to develop revenge fantasies, hallucinations, panic attacks and even attempt suicide.

Those psychological observations were among a trove of evidence that convinced a B.C. Superior Court judge that "many inmates are likely to suffer permanent harm as a result of their confinement."

Justice Peter Leask ruled Wednesday that isolating federal prisoners for unclear lengths of time is unconstitutional, and he struck down a law that permitted the practice known as “administrative segregation.”

Leask suspended his decision for a year in order to give the federal government time to respond.

The judge came to his decision, in part, after weighing conflicting testimony from psychology experts, who debated whether or not patients were at risk of living with long-term consequences from extended time inside solitary confinement.

The British Columbia Civil Liberties Association and the John Howard Society, which filed the legal challenge in 2015, argued that solitary confinement can lead to delirium, psychosis, major depression, hallucinations, paranoia, aggression, rage, loss of appetite, self-harm, suicidal behaviour, and disruption of sleep patterns.

The government denied those harms, and said research remains inconclusive on the impacts of the practice. Solitary confinement, the government argued, is an important tool for prisoners who pose a risk to others or are at risk themselves.

In a 58,000-word ruling, the judge laid out each side’s argument.

‘Strikingly toxic’ effects

Dr. Stuart Grassian, a psychiatrist and faculty member at the Harvard Medical School for more than 25 years, told the court that restricting an inmate’s environmental stimulation for nearly an entire day is “strikingly toxic” to their mental functioning.

Grassian interviewed 14 inmates in solitary confinement in a Massachusetts prison and published an article on his findings in 1983. Grassian found that nearly one-third of the inmates suffered from hallucinations and reported hearing voices.

More than half the inmates had panic attacks, and about the same number became fixated on fantasies of revenge, such as torturing prison guards.

Such extreme symptoms are rare in psychology, and Grassian said the fact they happened independent of psychological illness reflects the serious impact of solitary confinement.

Dr. Craig Haney, an American psychologist who has interviewed more than 1,000 segregated inmates throughout his career, backed up those findings.

Haney said the root of the harm is the elimination of meaningful social contact. As the judge wrote in his ruling, social deprivation “deprives people of the opportunity to ground their thoughts and emotions in a meaningful social context -- to know what they feel and whether those feelings are appropriate.”

Without a way to ground their thoughts, Haney said, inmates are left with no other choice than to adapt in socially pathological ways. Some inmates change the way they speak and think, and can become extremely anxious when re-introduced to others.

In extreme cases, these inmates lose the ability to live a fulfilling social life after leaving solitary confinement, Haney said. Haney also points to higher rates of self-mutilation and suicide within solitary confinement units.

Government expert: Most inmates don’t suffer

On the government’s side, Dr. Jeremy Mills, an Ontario psychologist who has worked in federal prisons, testified that, based on his own experience and review of scientific studies, inmates without mental illness do not suffer psychological symptoms because of their placement in solitary confinement.

Mills said that, while some inmates experience a period of adjustment that can last for a few days, most return to their baseline of psychological functioning.

Mills said that, in some cases, inmates report improved functioning if they were previously in a stressful social situation within the inmate population.

Advocate: ‘Dungeons’ aren’t the answer

In the end, the judge sided with the plaintiff’s argument.

Josh Patterson, executive directorof the British Columbia Civil Liberties Association, called the decision “stunning.”

“The correctional service has an obligation to ensure that inmates are safe each from the other and that harming them in order to protect them -- putting them in these holes, in these dungeons, in order to protect them -- is not an answer,” Patterson told CTV’s Power Play on Wednesday.

The ruling comes after the federal government tabled a bill in June that would set a time cap for segregation at 21 days. Once that legislation is law for 18 months, that cap would be reduced to 15 days.

The government had previously attempted to halt the trial, saying its legislation was dealing with the issue. The judge decided to allow the case to continue.