Wayne Wilcox spent 489 days locked up in what he called "a prison within a prison."

The Edmonton Remand Centre inmate was in segregation for 23 hours a day.

That's 11,247 hours.

According to the Alberta Court of Appeal, that may have violated his charter rights.

In a 20-page decision issued last week, the province's highest court determined a Court of Queen's Bench justice made some legal errors when he dismissed an application filed by Wilcox known as habeas corpus.

A habeas corpus application can be filed by anyone who feels they've been unlawfully detained by a government body. The applications are supposed to be heard immediately.

In an affidavit to support his application, Wilcox described how his mental health deteriorated because of his living conditions at the remand centre.

"He feels isolated, anxious, and depressed," the Court of Appeal written decision noted. "He is becoming paranoid."

Wayne Wilcox was in administrative segregation at the Edmonton Remand Centre for 489 days. (Facebook)

Wilcox said he was placed immediately into administrative segregation because he was suffering from an injury when he was taken into custody and remand centre staff felt he would be unable to protect himself. He said staff told him the segregation continued for his own safety because of his "incompatibles."

Court of Queen's Bench Justice Denny Thomas refused to hear Wilcox's application. He decided the accused's liberty was not deprived because he was placed directly into administrative segregation rather than being moved from the general population to solitary confinement.

Thomas concluded the application was "abusive" and "vexatious" and ordered Wilcox to pay $1,500 in court costs.

Amanda Hart-Dowhun, who represented Wilcox during the habeas corpus process, said she was disappointed with the ruling.

"Being told that it didn't have merit and wasn't appropriate was very disappointing for me both on a personal level and because I felt it left a lot of inmates very vulnerable and without good recourse," Hart-Dowhun said.

The Alberta Court of Appeal decided Thomas was wrong in law, noting, "The decision under appeal fails to recognize that a prisoner in solitary confinement suffers a deprivation of the residual liberty interests that he would have enjoyed had he been placed in the general population of inmates. It matters not that the prisoner was never placed in the general population beforehand."

'In the interests of justice'

Wilcox went into the remand centre on Dec. 14, 2017, and was moved to general population on April 17, 2019. He was released from custody in December 2019 after being sentenced to time served.

The Alberta Court of Appeal heard his case on Oct. 28, 2019, even though the three justices knew that by the time they issued a ruling, it would be a moot point since Wilcox would no longer be in custody.

"We conclude that despite its mootness, this appeal should be decided," the court wrote. "The gathering evidence and judicial consideration of placement in solitary confinement confirm that the issues raised in this appeal are of sufficient importance that they ought to be decided."

Edmonton defence lawyer Amanda Hart-Dowhun said the decision will pave the way for future applications. (Janice Johnston/CBC News )

Hart-Dowhun thinks the province's highest court sent an important signal.

"I think that it shows that the Court of Appeal views issues around solitary confinement that they believe those issues are serious and they need to be addressed when it's moot," Hart-Dowhun said.

The Court of Appeal determined Wilcox's argument had merit and should have been heard by the lower court judge.

"The facts alleged clearly identify that the essence of Mr. Wilcox's claim is solitary confinement at ERC for in excess of a year without any or adequate reason as time passed and without fair process for review," the decision stated. "There can have been no doubt that the nature of the application was habeas corpus."

Hart-Dowhun said the decision will be binding on the Court of Queen's Bench in Alberta and will pave the way for future applications.

"I'm really pleased to see it," Hart-Dowhun said. "It opens up habeas corpus to a large number of people including some of my clients and I think it's in the interests of justice."