Long-term prisoners previously had the right to early release after two-thirds of their sentence.

Now offenders who the courts have ruled must be supervised upon release will have to serve the whole of their jail term.

Cons serving four years or more who don’t require super-vision after release will be freed six months before the end of their sentence.

Long-term inmates will still be able to apply for release after half their sentence but whether this is granted or not is up to the Parole Board.

Tories say the change will only apply to three per cent of prisoners and neither they nor Labour supported the legislation.

But Matheson said: “This law is proof of our commitment to keep communities safe and reduce the chance of prisoners reoffending.

“Prison will always be the right place for dangerous offenders.

“This law is part of our aim to achieve a more balanced justice system, protecting our communities from serious offenders.”

The legislation also brings in increased flexibility to change release dates to avoid inmates being freed on Fridays, weekends or public holidays when it can be harder for them to access support services.