Legislation has come into force to close a legal loophole where prisoners serving life sentences could be eligible for release on parole earlier than those serving fixed sentences.
Justice Secretary Kenny MacAskill said the Criminal Cases (Punishment and Review) (Scotland) Act addressed a technical anomaly in the law, which had created what he described as an absurd situation.
The loophole emerged following an Appeal Court judgment which meant that prisoners given a discretionary life sentence or Order for Lifelong Restriction (OLR) could apply to become eligible for parole earlier than those serving sentences of a fixed length, by appealing against the punishment part of their sentence, which is the minimum time they must spend in jail.
Rapist Robert Foye and paedophile Morris Petch lodged appeals against the punishment part of their sentence.
The court ruled that Foye, who raped a schoolgirl while on the run from an open prison, would serve at least four-and-a-half years in prison before being considered for parole - half the original nine-year punishment part of his sentence.
The new legislation means the courts have regained the discretion to set a punishment part of non-mandatory life sentences that it considers appropriate in all the circumstances of a particular case.
Mr MacAskill said: "I'm pleased that this Act has now come into force as it closes a legal loophole caused by a recent judgement which created the absurd situation of prisoners serving life sentences being able to qualify for parole earlier than those not serving life.
"It is very important to ensure that the courts have compete confidence that when they impose a discretionary life sentence or an OLR, they can impose an appropriate period of punishment as part of the overall sentence.
"These types of sentence are an important way of ensuring serious offenders are effectively punished and the public are protected."