TORONTO -- A hard limit on how long inmates can be in solitary confinement could be dangerous, the federal government argues in asking the Supreme Court of Canada to set aside the 15-day cap Ontario's top court recently imposed on administrative segregation.

The government also wants last month's ruling by the Ontario Court of Appeal -- slated to take effect Friday -- to be put on hold pending the proposed challenge.

In this week's notice of application for leave to appeal, the government maintains the lower court did not appear to take into account the potential danger of imposing a hard cap on administrative segregation.

"The judgment will have the effect of creating a legislative void in respect of circumstances where the safety and security of a penitentiary continues to be in jeopardy beyond 15 days, or the investigation of a possible criminal charge has not been completed within 15 days," the government argues in its leave-to-appeal notice. "There is currently no alternative recourse to address these situations, placing the safety and security of all federal institutions, the inmates and the staff at high risk."

Late last month, Ontario's Appeal Court struck down parts of the Corrections and Conditional Release Act, which allows authorities to keep inmates in solitary confinement when they are deemed to pose a risk to themselves or others and there is no reasonable alternative.

The court found segregation longer than 15 consecutive days violates the charter because it amounts to cruel and unusual punishment. It gave Ottawa until April 12 to change the practice.

While the government argues that's not enough time, it remains unclear whether it will comply by Friday given that its stay request to the Supreme Court won't be heard by then. Ottawa did not immediately respond to a request to discuss the situation.

Critics of isolation say studies indicate that depriving inmates of meaningful human contact for much of their day can cause long-term, even permanent, psychological damage.

The Canadian Civil Liberties Association, which mounted the constitutional challenge to the legislation, said the government is trying to continue the practice with its request to appeal.

"It is deeply disappointing that Canada refuses to heed the decision of every court that has considered the constitutionality of prolonged solitary confinement," association lawyer Michael Rosenberg said. "Instead of doing better, Canada is seeking to enlist the assistance of the highest court in the land to continue to subject vulnerable people to prolonged isolation, with devastating consequences."

In its request to the Supreme Court, Ottawa says the time limit is inappropriate, in part because it interferes with other regulations aimed at keeping prisons and those in them safe.

The Appeal Court judgment could also lead to inconsistency among provinces, the government says. The notice points to an ongoing segregation challenge in British Columbia, raising the possibility of "another inconsistent or contrary" judgment.

"This will lead to further confusion as to the state of the law," the government says.

The leave application calls on the Supreme Court to decide whether it's enough to strike down a law based on the possibility that it goes too far, and whether courts have to consider the reason and purpose of the law.

It's also important to decide whether the Ontario Court of Appeal was wrong to put its ruling on hold for only 15 days "without considering the risk to safety and security of federal correctional institutions," the government says.

In December 2017, Superior Court Justice Frank Marrocco ruled that the solitary confinement legislation was unconstitutional because the system lacked proper safeguards. Marrocco put his ruling on hold for one year -- later extended to April 30 -- to give Parliament a chance to fix the problem.

Ottawa, which did not appeal Marrocco's ruling, also wants that decision put on hold until the end of November to allow for legislative changes.