A taxi driver convicted of murdering Glasgow shopkeeper Asad Shah has been granted leave to appeal his “excessive” 27-year sentence.

It comes amid calls for an investigation into how he was able to upload YouTube messages from prison encouraging supporters to behead “insulters” of Islam.

Tanveer Ahmed, 32, believes judge Lady Rae did not follow proper legal guidelines when she set his jail term for murdering Mr Shah in a a religiously-motivated attack in Shawlands, Glasgow, on March 24.

Ahmed, of Bradford, West Yorkshire, pleaded guilty at the High Court in Glasgow in July to stabbing Mr Shah, 40, a total of 30 times outside his shop.

Read more: Shawlands shopkeer Asad Shah's killer plans launches bid to reduce life sentence

The court heard how drove more than 200 miles from his home in England to confront the shopkeeper who he believed had “disrespected Islam”.

Ahmed said he had been offended by clips Mr Shah had posted online discussing his religious beliefs. Ahmed was a Sunni Muslim while his victim was a member of the Ahmadi branch of the religion.

Unlike the majority of Muslims, Mr Shah’s sect believes that their own founder, Mirza Ghulam Ahmad – not the prophet Muhammad – was the final Muslim prophet.

The viewpoint is considered blasphemous in some countries and the Shah family had previously fled their home in Pakistan in the 1990s to escape persecution.

In return for guilty pleas, Scottish judges have the discretion to reduce sentences by as much as 30 per cent.

When Ahmed was convicted, Lady Rae said that if he had not admitted the crime, she would have sentenced him to 30 years.

Ahmed’s legal team believe that the sentence was excessive and he should have been given a larger discount.

An appeal judge rejected the appeal ground earlier this year.

However, at a short hearing in Edinburgh yesterday, judges Lady Dorrian, Lady Clark of Calton and Lord Menzies allowed the appeal ground to be reinstated.

It will now be a second point in Ahmed’s appeal against sentence. The first appeal point is that Lady Rae’s belief that the crime would have merited a 30-year jail term is incorrect and excessive.

Lady Dorrian said: “We are content for the two points to proceed together.”

The date of Ahmed’s appeal is yet to be fixed.

Read more: Shawlands shopkeer Asad Shah's killer plans launches bid to reduce life sentence

He was represented by Brian McConnachie QC and was not present in court.

Meanwhile, there have been calls for an investigation after it emerged that extremist audio messages from Ahmed appear to have been uploaded to YouTube after he was jailed for life.

In one recording, dated September 7, Ahmed said he had “the honour of sending him [Mr Shah] to the hell forever”.

The message goes on to urge listeners to kill non-believers, saying: “There’s only one punishment for insulters: cut off their heads, cut off their heads.”

A spokesman for the Scottish Prison Service said he could not comment on official cases. He added: “We work closely with Police Scotland to detect and prevent crime. We make recordings of phone calls made in prison.”

Police Scotland is also investigating whether the messages constitute hate speech or incitement.