The federal government has lost its last-minute bid to quash a landmark trial challenging Canada's solitary confinement prison practices.

Today, a British Columbia Supreme Court judge rejected the Attorney General of Canada's application to halt the case.

The Charter challenge, launched by the B.C. Civil Liberties Association and the John Howard Society of Canada in January 2015, will now go ahead as scheduled on July 4.

The lawsuit says current policies cause suffering and death, deprive fundamental protections, and discriminate against mentally ill and Indigenous inmates, all practices that amount to "cruel and unusual punishment."

BCCLA lawyer Caily DiPuma welcomed today's court ruling.

"The problem with the practices of indefinite long-term solitary confinement in Canada have been apparent for many decades and today the court recognized that the government can't derail a clearly deficient bill in the eleventh hour," she told CBC News.

The government had filed a last-minute application to the Supreme Court of British Columbia arguing that going ahead with the case would be a waste of court resources, since concerns about prolonged segregation are being addressed in new government legislation. 

It was filed in Vancouver last Tuesday, just one day after the government tabled a bill setting a 15-day limit for segregation, and just two weeks before the landmark case was set to begin.

The trial is expected to last about nine weeks.

Under the new bill C-56, Correctional Service Canada (CSC) would have an 18-month transition period, during which time the cap will be set at 21 days. 

New directives that came alongside the bill say inmates with serious mental disorders — who are engaging in self-injury or are at risk of suicide, are pregnant, have mobility issues or are in palliative care — should not be placed in segregation unless "exceptional circumstances are identified."

No certainty bill will pass

The BCCLA and John Howard argued against the government's application, saying that there are big gaps in the bill and that there's no certainty it will even pass.

ashley-smith03nw1

Calls to limit the segregation of prisoners grew louder after the death of teen prisoner Ashley Smith in 2007. (Photo courtesy of Ashley Smith's family)

Calls for tighter restrictions over solitary confinement grew louder after the high-profile inquest into the death of teen prisoner Ashley Smith.

Smith died in a segregated prison cell at the Grand Valley Institution for Women in Kitchener, Ont., in 2007.

A coroner's jury ruled that her self-inflicted choking death was a homicide and made 104 recommendations to prevent similar deaths in the future. 

DiPuma said a decade later, there have been no policy changes that would prevent a similar death behind bars.