Mr Shah was left with a broken jaw, broken nose and cheek bones. The assault was so severe that he also suffered a fractured skull to an extent more often seen in victims of car crashes.
Ahmed, of Bradford, Yorkshire, drove 200 miles from his home town to Minard Road, in Shawlands, where he launched the attack on the popular shopkeeper on March 24.
During the journey He watched online footage of Mr Shah and made the comment “something needs to be done, it needs nipped in the bud”.
Ahmed had been in Glasgow on two or three occasions in February and March 2016 to visit a friend of his who was in hospital.
Two days before the murder, the killer stayed overnight with a local man who was a mutual friend and who had offered him a place to stay. That man knew Asad Shah.
He showed the taxi driver Mr Shah’s Facebook postings, including one in which he claimed to be a prophet.
Ahmed returned to Bradford the following morning and said he would come back to Glasgow the next day.
After driving the 200 miles in his Uber taxi to Mr Shah’s shop on March 24, he walked in at around 9pm and started speaking to him. Mr Shah offered his hand to his killer but this was refused.
Prosecutor Iain McSporran told the court: “They converse in Urdu, it appears that the accused is speaking intensely to Asad Shah. His demeanour and gestures are at least consistent with his account that he was attempting to persuade the shopkeeper to his point of view.
“Mr Shah appears to use a phone, and the accused stands patiently, even ushering a customer forward so that he can be served.
“The accused immediately resumes speaking to Shah, gesturing as if making a point. From what we can see of Mr Shah, he is responding but not apparently agreeing with the accused.
“Having apparently not received the response he was looking for, reaches into the robes he is wearing and removes a knife with which he attacks Asad Shah, moving behind the counter to do so.
“Stephen McFadyen, who was working nearby in the shop, approaches and attempts to assist but the incident is fast moving and he is unable to prevent the attack, involving repeated stab wounds aimed at the head and upper body, continuing.
“Asad Shah attempted to flee his assailant and moved outside the shop but the accused kept hold of him and continued striking him with the knife.”
Mr Shah’s brother then tries to help as they spill out of the shop onto the street but the blows from Ahmed continue even after he wield a newspaper advertising board to try to fend off Ahmed.
Mr McSporran added: “He drags his injured brother away but the accused continues his determined attack. Athar Shah makes a valiant but vain attempt to fend off the attacker, wielding an advertising sign as the only available weapon but without effect.
“Whilst the attack continued, with the accused kneeling on the victim, pinning him to the ground, Stephen McFadyen bravely reached for the knife and grabbed it from the accused, running across the road and placing it in bushes out of harm’s way.
“The accused then began punching, kicking and stamping with full force on the prone body of Asad Shah who was long past being in any position to defend himself. Many blows were delivered to his head and face, despite Athar’s repeated pleas for him to stop.”
The attack then suddenly stopped and Ahmed walked calmly to a bus shelter nearby where he sat, head bowed as if in prayer. He made no attempt to escape.
Police attended and found a bloodied Ahmed who told them where the knife was and that he had no other weapons on him.
He was immediately cautioned and stated: “I respect what you do and I have nothing against you and so I am not going to hurt you. I have broken the law and appreciate how you are treating me”.
Before the next day, the killer was interviewed under caution and explained that he had acted alone and that his actions were motivated by Asad Shah’s decision to “disrespect the Koran, the Prophet Mohammed, Allah and Faith”.
He said that he had warned Asad Shah that he was there to kill him, had asked him to stop claiming to be a prophet but that he had insisted he was.
Judge Lady Rae there was “no justification” for Ahmed’s attack, which was a “most shocking crime”. She warned him he faces a “very lengthy prison sentence”.
Mr Shah suffered horrendous injuries. As well as several broken bone and a fractured skull, his throat and neck were badly injured as a result of “numerous powerful blows”.
The injuries t his face were so severe that even experienced police photographers were warned about them before seeing the body.
Mr Shah’s death shocked the local community and Scotland as a whole, with hundreds gathering for a vigil outside his shop, which also became the site of tributes to the 40-year-old.
In response to the killing, more than £110,000 was raised in an online campaign for the family of the well-liked shopkeeper.
Mr Shah posted several videos on Google Hangouts filmed in his shop in which he sang and spoke about his religious beliefs. In one of the videos he claimed to be a prophet and in the other he calls for the start of a “new religion”.
Muslims believe Muhammad was the final prophet and that no others would follow.
In the statement previously released through his lawyer, Ahmed said the killing of Mr Shah happened because he “disrespected the messenger of Islam the Prophet Muhammad” and “claimed to be a prophet.”
He went on to say that if he had not carried out the killing, others would have and “there would have been more killing and violence in the world.”
In one of his videos, Mr Shah said: “God has given me, at a young age with his grace, the promise to be a prophet. What he rewarded Mohammad with, he rewarded me the same because I followed in his footsteps.
“Anyone who walks in the Prophets footsteps and gives himself to God can have the same promise. Thanks to God, he has selected me and all the promises which God has said for humans in this world.”