Military members accused of serious offences under military law do not have a constitutional right to a jury trial, the Supreme Court ruled Friday.

The Charter of Rights and Freedoms guarantees a right to a jury trial, except in the case of "an offence under military law."

In a 5-2 decision, the Supreme Court upheld a section of military law that allows Canadian Armed Forces members to be charged in the military system for civilian offences in the Criminal Code, such as sexual assault, or any other federal statute.

The court's decision restores clarity to a military justice system that had been thrown into chaos after a military appeals court ruled last year that members did in fact have a right to a jury trial for some serious offences.

Speaking after the decision was released, Col. Bruce MacGregor, the military's chief prosecutor said the ruling "further legitimizes the military justice system" and that members should take pride in their process.

In the cases leading to the Supreme Court's decision Friday, several military members accused of serious offences like sexual assault and forgery argued that the exception in the Charter should apply to only "pure" military offences, like spying.

They said the section that transforms civilian offences into "service offences" deprived them of their right to a jury trial, infringing their constitutional rights.

In Friday's ruling, the majority on the Supreme Court found that the exception in the Charter applied because the transformation of civilian offences into military ones was done through a validly enacted and constitutional section of military law.

The section is "not inconsistent" with the Charter because "it does not deprive a person who is lawfully entitled to a jury of that right," the court's majority opinion said.

The opinion, written by Justices Michael Moldaver and Russell Brown, also said the only connection required to pursue the case in the military system was if the person charged was a military member.

The court's dissenting opinion, written by Justices Andromache Karakatsanis and Malcolm Rowe, argued a military connection should be established, and a jury trial allowed when the case involves no military connection. They said a test should be established to determine the level of connection between a case and its relevance to the military.

The majority argued that a test to establish a military connection would not be consistent with other aspects of the law. The ruling said such a test would require courts to undergo an "unwieldy" process, and potentially impair the goals of maintaining discipline, efficiency and morale in the military.