The Supreme Court of Canada says making an accused person wait in jail before trial should be the exception, not the rule, in a decision that affirms a key legal safeguard intended to ensure speedy justice.

In a 9-0 ruling today, the high court says people accused of crimes are automatically entitled to periodic reviews of their detention under provisions set out in the Criminal Code.

In clarifying how the provisions should work, the court says Parliament intended to ensure that people awaiting trial have their cases reviewed by a judge at set points in time to consider whether keeping them in jail is justified.

It means jailers must apply to a judge for a hearing on behalf of the accused at the 30-day mark in cases involving lesser offences, and at the 90-day mark in cases involving indictable offences.

The case landed at the high court as a result of an appeal by Corey Lee James Myers, who was arrested on several firearms charges in British Columbia three years ago.

Though Myers eventually pleaded guilty to reduced charges, he also challenged a decision to keep him in custody pending trial.