The Supreme Court of Canada has ruled that retroactive changes to parole eligibility brought in by the Harper government are unconstitutional.

The top court was the third successive court to find that the March 2011 legislation was in clear breach of the Charter of Rights because it imposed new punishment on people who had already been tried and sentenced.

The retroactive changes — which lengthened the amount of time a non-violent, first-time offender had to spend behind bars before being eligible for parole — were deemed by the court to be a form of double jeopardy.

The ruling means dozens or more prisoners may have been locked up illegally under the Conservatives’ Abolition of Early Parole Act.

The Supreme Court ruling is just one of a number of constitutional challenges being launched against the Harper government’s tough-on-crime legislative agenda.

It comes after a Justice department lawyer blew the whistle on what he says is lax vetting of new federal laws for their ability to withstand Charter challenges.