TORONTO - The Canadian Civil Liberties Association is asking Ontario's top court to impose a 15-day cap on solitary confinement for inmates and to bar the practice altogether for youth and other vulnerable groups.

The association says a lower Ontario court didn't go far enough in ruling that isolating inmates for more than five days in a practice known as administrative segregation is unconstitutional because the system lacks proper safeguards.

It argues the judge erred by finding inmates in solitary confinement could be monitored and pulled from isolation if they show signs of harm.

In a hearing in Toronto on Tuesday, the association said knowingly exposing inmates to harm and then removing them when harm occurs amounts to cruel and unusual punishment.

Last December, Ontario Superior Court Justice Frank Marrocco gave the federal government a year to change its law, noting that doing so immediately could put inmates and staff at risk.

The deadline is Dec. 18 and the association says it will oppose Ottawa's request for an extension, which is expected to be heard by the court of appeal this week.