In a strong defence of judicial discretion, the Ontario Court of Appeal has struck down part of the Truth in Sentencing Act, a centrepiece of the Conservative government's tough-on-crime agenda.

The ruling, which directly affects only Ontario, could mean shorter jail terms for hundreds of prisoners. Adding insult to injury for the government, the 3-0 ruling was written by the court's new chief justice, George Strathy, appointed by federal Justice Minister Peter MacKay in June after the government left the position vacant for an unprecedented six months.

The government had accused judges of sullying the justice system's reputation by granting generous credit to offenders who had spent time behind bars before their trials began. Since the early 1970s, judges had routinely given those offenders credit for two days in jail for every day served before sentencing – in recognition of the near-automatic reduction of jail terms by one-third that offenders receive after sentencing.

Story continues below advertisement

With the 2010 Truth in Sentencing Act, the government set one day credit for each day served as the general rule, and 1.5 days credit where circumstances justify it. But for offenders who were denied bail primarily because of their criminal record, the act says they must not be given any extra credit.

The court said this bar to extra credit was unconstitutional because it could mean that offenders like the man before the court, Hamidreza Safarzadeh-Markhali, spend nearly a year longer in jail than others who committed a similar crime. Some of those offenders may have been denied bail because they lacked the social supports to persuade a justice of the peace that they should be released, Chief Justice Strathy wrote.

"Canadians understand that a sentence must be fair, in all its aspects," Chief Justice Strathy wrote. "Public confidence in the criminal justice system would be undermined by an artificial distinction that results in longer jail terms for some offenders."

Mr. Safarzadeh-Markhali, who was convicted of smoking marijuana while he drove and carrying a loaded gun, received six years in prison. He served nearly 21 months in custody before his sentencing; the trial judge ordered that he be given 31 months credit for that time. The Ontario government had appealed that ruling.

The appeal court's ruling was a second devastating blow to the Truth in Sentencing Act. In April, the Supreme Court ruled unanimously that judges could routinely give 1.5 days credit for each day in pretrial custody, in spite of the government's argument that the general rule should be one day counts as one day.

Both the earlier ruling, and this one, were important tests of how far the government could go to limit judges' discretion in sentencing. Chief Justice Strathy made it clear that he took no issue with the government's wish to make repeat offenders serve longer periods in jail.

"Unfortunately, however, like many attempts to replace the scalpel of discretion with a broadsword, its application misses the mark and results in unfairness, discrimination and ultimately unjust sentences. Instead of ensuring that repeat offenders serve a greater portion of their custodial sentences, the law targets only those denied bail due to their previous convictions."

Story continues below advertisement

A spokesman for the Ontario Attorney-General's department said it was too early to say whether the government would try to appeal the ruling to the Supreme Court.

Chief Justice Strathy said the law violated the principle of proportionality at the heart of the Charter of Rights and Freedoms' Section 7, which protects security of the person.

"That principle is understood and endorsed by all Canadians and is applied in our courts on a daily basis," he wrote.

A press secretary for Mr. MacKay said the government was reviewing the decision. "Canadians expect violent criminals to serve sentences which reflect the severity of their crimes," Clarissa Lamb said. "We will continue moving forward with our tough on crime agenda and support victims of crime despite the opposition parties' efforts to stand in our way."