A judge's finding that numerous prison lockdowns amounted to cruel and unusual treatment for two detainees was overturned Wednesday along with the $85,000 in damages he had awarded them.

In its ruling, Ontario's top court found the lower court judge had overstated the frequency, duration and impact of the lockdowns affecting Jamil Ogiamien and Huy Nguyen during their detention at the maximum security Maplehurst Correctional Complex in Milton, Ont.

"The lockdowns affecting Ogiamien and Nguyen occurred about half as frequently as found by the application judge," the Appeal Court said. "In some instances, (they) were of a shorter duration and had less of an impact."

In May 2016, Superior Court Justice Douglas Gray awarded $60,000 to Ogiamien, 46, a Nigerian facing deportation, and another $25,000 to Nguyen, who was awaiting trial on firearms charges.

The lockdowns they went through over a two-year period violated their rights because they were largely confined to their cells, deprived of the ability to maintain basic hygiene, and otherwise subjected to harsh conditions that affected their mental and physical health, Gray ruled.

Treatment not 'grossly disproportionate'

However, at an appeal hearing in February, the Ontario and federal governments argued that Gray had misunderstood the evidence. The governments also argued Gray had failed to appreciate the steps the province had taken — albeit to little effect — to address the long-standing staffing issues that resulted in the frequent lockdowns.

The Appeal Court, which said it accepted that the detention conditions caused the two men hardship, nevertheless found Gray made errors in assessing the impact of the lockdowns on them. For example, Gray mistakenly found that Ogiamien and Nguyen were forcedto share prison time with convicted offenders, the Appeal Court said.

"Inmates in the remand unit at Maplehurst do not share their time in their cells with inmates who have been convicted and are serving a sentence," Justice John Laskin wrote for the Appeal Court. "They share their time in cells with other inmates on remand."

Laskin also rejected Gray's comparison of a lockdown to solitary confinement, calling it unwise to relate the two without expert evidence. He also noted that Maplehurst inmates shared cells during lockdowns.

In all, the Appeal Court found the conditions inflicted on the two inmates — even if unpleasant at times — didn't rise to a level of cruel and unusual punishment as Gray said it had. Among other things, they still had access to showers, their lawyers, medical care and even television.

"Their treatment under lockdowns undoubtedly added to the hardships they experienced at Maplehurst but it was not treatment that met the high bar of being grossly disproportionate or so excessive as to outrage standards of decency," Laskin said.

While the ruling automatically negated the damages award, the Appeal Court also faulted Gray for deciding the men deserved the cash given that they had not asked for any money. Making the award, the court said, was unfair to the provincial and federal governments, which should at the very least have had an opportunity to make submissions on the issue.

Ogiamien was released under strict conditions in the middle of last year as he fought deportation. Laskin declined to order Nguyen's release in light of the finding that the lockdowns did not amount to cruel and unusual punishment, adding the conditions of confinement were no more restrictive than those faced by other remanded inmates.