The teenager who abducted, raped and murdered Alesha MacPhail has had his 27-year minimum sentence reduced by appeal judges.
Aaron Campbell was 16 when he was sentenced to life for killing the six-year-old on the Isle of Bute.
In August, his counsel, Brian McConnachie QC, told the Court of Criminal Appeal in Edinburgh that the term was excessive in light of his age.
Three judges ruled on Tuesday his sentence should be cut by three years.
Campbell, now 17, will still serve the longest term of detention to be imposed on a juvenile offender in Scotland.
Prior to Campbell's sentence, Luke Mitchell, the teenager who killed school girl Jodi Jones in 2003, received 20 years.
Mr McConnachie told Lady Dorrian, Lord Menzies and Lord Drummond Young at the start of the appeal: "It was clearly an appalling and heinous crime.
"The outcome of this appeal will not determine when, or indeed if, the appellant is allowed release."
However, psychologist Dr Gary Macpherson concluded: "I am of the view that the capacity for change may be limited due to the nature of Aaron Campbell's personality structure and his complex risk factors.
"I apologise to the court for appearing pessimistic, however, I am not confident that Aaron Campbell has the capacity or desire to change his behaviour in any meaningful way and as such the risks will remain for the foreseeable future."
'Appropriate to reflect his youth'
The appeal ruling said: "In determining the appropriate punishment part the trial judge took account of several cases where the appellant had been a young person."
It went on to say that comparing Campbell's case with past cases gave "limited guidance", and the majority in that case also "highlighted the difficulty of such a comparative exercise".
After comparing a number of cases where the offender had been a young person or when the crime was of a violent nature, the judges reduced Campbell's sentence from 27 to 24 years.
The ruling said: "A punishment part in excess of 20 years was plainly merited. We have concluded that a punishment part of 24 years would be appropriate to reflect the appellant's youth.
"We will accordingly allow the appeal to the extent of substituting that period for the sentence imposed."
After hearing about the ruling, Alesha's uncle, Calum-John MacPhail, posted on social media that he would speak to Justice Secretary Humza Yousaf about the decision.
He later told BBC news: "I am angry, upset, done with it. I'm angry at the decision.
"He should be tried like an adult. He doesn't deserve to have been given any less - or even an appeal."
Meanwhile, Scottish Conservative justice spokesman Liam Kerr said the ruling was "disgraceful".
He said: "This is one of the most vile criminals in Scotland, and he should not be enjoying having time shaved off his sentence. If anything he should be looking at an even longer stint.
"Yet again Scotland's justice system has come down favourably on the side of the criminal and it will cause massive upset to the victim's family."
A Scottish government spokesperson said they would not comment on decisions about sentencing.
However, they added: "A person will not be considered for parole until the punishment part of the sentence has expired."
Alesha, from Airdrie, North Lanarkshire, was only a few days into a family holiday in Rothesay when Campbell took her from her bed in the middle of the night on 2 July last year.
The child's body was found in the grounds of a former hotel the following morning.
A post-mortem examination later revealed she had suffered 117 injuries.
During his nine-day trial in February, Campbell lodged a special defence naming the 18-year-old girlfriend of Alesha's father as the killer.
He also took the stand and told the jury his DNA must have been planted at the crime scene.
However, before being sentenced he confessed to the killing.