OTTAWA - The Supreme Court of Canada has ruled that two federal laws from the previous Conservative government's tough-on-crime agenda are unconstitutional.

In a 6-3 vote, the high court says a mandatory, one-year minimum sentence for a drug crime when the offender has a similar charge on the record constitutes cruel and unusual punishment, a violation of section 12 of the Charter of Rights and Freedoms.

The case came about after Joseph Ryan Lloyd was convicted in September 2014 of three counts of possessing crack, methamphetamine and heroin for the purpose of trafficking in Vancouver's Downtown Eastside.

He also had a 2012 trafficking charge.

The provincial court ruled that while the appropriate sentence for Lloyd was one year, the mandatory minimum sentence constituted cruel and unusual punishment and violated the charter.

The Supreme Court also says that provisions passed in 2009 which prohibit a trial judge from giving more than one-for-one credit for pre-trial detention if a justice of the peace denies bail to the person because of a previous conviction are unconstitutional.