Joseph Ryan Lloyd of British Columbia was convicted last year of possession of drugs for the purpose of trafficking and was subject to a mandatory one-year sentence because of an earlier, similar conviction.
The provincial trial judge ruled the law was unconstitutional, although Lloyd was sentenced to a year.
The British Columbia Court of Appeal said the provincial court judge overstepped by declaring the law unconstitutional.
The appeal judges imposed an 18-month sentence.
The Supreme Court gave no reasons for hearing the case, but the justices struck down a mandatory minimum sentence for gun offences earlier this month.
Also on HuffPost