PROSECUTORS have succeeded in overturning an ‘unduly lenient’ minimum jail term given to a ‘gloating’ murderer who sent photos of his dead victim to others.

Appeal judges Lady Dorrian, Lord Matthews and Lord Woolman quashed 28-year-old Andrew Palfreman’s 12-year minimum sentence in a decision issued on Tuesday.

The judges, who were sitting at the Court of Criminal Appeal in Edinburgh, ordered that Palfreman should serve a minimum of 17 years before becoming eligible for parole.

Palfreman, of Lambhill, Glasgow, was given a life sentence this January for murder by judge Lord Summers following a trial at the city’s High Court.

Jurors heard how Palfreman repeatedly knifed Barry MacLachlan having been heard shouting: "Don't underestimate me.”

He then sent a series of photographs of Mr MacLachlan which were described by his own lawyer as being “despicable”.

Lord Summers told Palfreman, who had previous convictions for violence, that he’d serve a minimum of 12 years before he’d be able to apply for freedom. The judge decided on the term partly because he sought help for Mr MacLachlan a few hours after attacking him.

He’d also heard claims that Palfreman had mental health issues - the court heard how he was defending himself and was affected by somebody called “Mr Darkside” who lived in his head.

Lord Summers said he ‘acknowledged’ that Palfreman struggled with poor mental health in his sentencing statement.

But on Tuesday, the appeal court judges decided that Lord Summers had made mistakes in deciding the punishment part.

Lady Dorrian, who gave the judgement, said Lord Summers hadn’t properly assessed Palfreman’s previous convictions for violence in passing the sentence. She also concluded that there was no evidence to show that his mental health had been affected at the time of the assault.

In a written judgement, she wrote: “There was no reasonable basis to conclude that the respondent had acted impulsively, or that his mental health problems had affected his self-control and disposed him to violence.

“That does not accord with the vicious and sustained nature of the attack; nor does the callous behaviour and attitude of the respondent after the attack.

“The psychiatric report did not describe any concern regarding his mental state in the run up to, during, or after, the alleged offence; the author concluded that he had no delusional beliefs and that he retained insight into his behaviour and mental state.

“The respondent is hardly entitled to credit for the fact that he ‘did not run away’, having gone to bed instead of seeking help, despite hearing the deceased crying for help, and waiting for four hours before calling an ambulance.

“The trial judge erroneously stated that the respondent admitted his guilt: that is precisely what he did not do. He admitted causing the death, but disputed any criminal responsibility therefor.”

The killing occurred sometime between July 2 and 3 last year in a flat in Knapdale Street, Lambhill.

After being stabbed, Mr MacLachlan - known as Big Baz - was heard stating: "I am dying here.”

Despite what happened, Palfreman did not get help for Mr MacLachlan.

In his closing speech to jurors, Palfreman’s lawyer Iain Paterson said: "I acknowledge that he did not call 999 immediately.

“He sent some despicable messages to people on his iPad - I accept that."

Police later arrived at the flat and Palfreman told them he had gone to bed and "woke up hoping it would all be away".

The killer added: "I am not going to lie - I must have stabbed him about seven times. I was at breaking point."

Palfreman also said there had apparently been a row about a dog, which the court heard was called Yogi.

Among his other claims, he further alleged: "I have a man in my head called Mr Darkside, who I try not to let out."

In sentencing Palfreman, Lord Summers said: “The dispute that led to his stabbing appears to have been of the most trivial sort.

“I also consider that your attitude after the crime is concerning. You appear to have gloated over the death of Barry MacLachlan.

“Having considered these issues and having regard to your unstable background, the lack of premeditation and the fact that you belatedly sought help, I have reached the conclusion that the punishment part should be set at 12 years.”

Earlier this year prosecutor Ruth Charteris KC - the solicitor general - told the appeal court that the sentence was unduly lenient. She said the circumstances of the murder meant that Palfreman should have received a longer minimum term.

Defence solicitor advocate Iain Paterson argued that the sentence was lenient but not unduly so.

However, the appeal court concluded that Lord Summers had made errors.

Lady Dorrian added: “In our view the sentence falls outwith the range of sentences which a judge at first instance, applying his mind to all the relevant factors, could reasonably have considered appropriate.

“There is nothing in the circumstances of this case that puts us at any disadvantage compared to the trial judge. He fell into error.

“For these reasons the appeal must succeed. We will quash the punishment part of 12 years and substitute one of 17 years.”