The Supreme Court of Canada has sounded a death knell for mandatory minimum jail sentences passed by the former Conservative government, indirectly sending a message to the Liberal government to get on with the job of undoing Harper-era laws that put judges in a sentencing straitjacket.

In two separate rulings that stress the importance of judges' discretion, the court struck at the heart of prime minister Stephen Harper's crime agenda.

In the first one, it said a mandatory minimum sentence of one year for drug traffickers who have a previous trafficking conviction is cruel and unusual punishment, and therefore unconstitutional. The ruling went on to say that other mandatory minimum sentences are similarly vulnerable to being struck down. The former Conservative government created 60 minimum sentences for gun, drugs, sex and other offences. Canada has the second most minimums in the world, after the United States, according to the Criminal Lawyers' Association.

Story continues below advertisement

"The reality is this," Chief Justice Beverley McLachlin, author of both rulings, wrote for the majority in a 6-3 decision. "Mandatory minimum sentences that, as here, apply to offences that can be committed in various ways, under a broad array of circumstances and by a wide range of people are vulnerable to constitutional challenge."

In a second case, this one unanimous, it struck down a provision of the Truth in Sentencing Act that said people denied bail because of a criminal record cannot be given extra credit for the time in custody before trial – that is, no more than one day credit for each day served. Judges routinely give those awaiting trial 1.5 days credit for each day served, after a previous Supreme Court ruling allowed them to do so, over the objections of the Harper government.

The effect of the rulings will be large. The Truth in Sentencing ruling will mean thousands of people each year will serve less time in jail, Jill Presser, a Toronto lawyer, said. And if the Trudeau government fails to do something about mandatory minimums, it will be faced with defending laws passed by another government, and with poor odds of winning in court.

Justice Minister Jody Wilson-Raybould said in a statement that the government supports mandatory minimums to some extent, as long as they are consistent with the Charter of Rights and Freedoms, and that Prime Minister Justin Trudeau has asked her to do a comprehensive review of changes to the justice system. That review will include the use of mandatory minimums, she said.

"The government supports the use of mandatory minimum penalties for the most serious crimes, and crucially, only where they are consistent with the Charter."

Rob Nicholson, the Conservative Party's justice critic, said the party was disappointed in the rulings. "Canadians tend to lose faith in the criminal justice system when they feel that the punishment does not fit the crime. We would hope the Liberal government's response to today's ruling would reflect Canadians' overall desire to get tough on criminals, especially drug dealers."

The mandatory-minimum ruling came in a case involving an addict, Joseph Lloyd, 25, living in Vancouver's impoverished Downtown Eastside, who sold drugs to his fellow addicts to support his habit. The court said that while a year in jail was a fair sentence for him, the mandatory minimum was cruel and unusual punishment on the basis of "reasonable hypotheticals" – such as a case in which addicts were merely sharing their drugs with one another.

Story continues below advertisement

It was the same legal argument – using hypothetical cases to strike down a three-year minimum sentence for illegal gun possession – that sparked a stinging dissent from three judges last year, written by Justice Michael Moldaver (who this time was in the majority). The three dissenting judges on Friday – Justices Richard Wagner, Clément Gascon and Russell Brown – wrote an unusual, jointly authored dissent, suggesting the desire for a stronger collective objection than an individually written dissent might achieve.

Despite the presence of Justice Brown – a vociferous, sharp-edged blogger when he was a law professor at the University of Alberta – their dissent was mildly worded. They rejected the shared-drugs example as imaginary, and said the court has struck down mandatory minimums only twice before. They reminded the majority of perhaps the most notorious mandatory-minimum case in Canadian history – life with no parole for at least 10 years for Robert Latimer in 2001, after being convicted of second-degree murder in the mercy killing of his disabled daughter. In that case, the court rejected Mr. Latimer's challenge to the minimum sentence.