A patient who killed his best friend two days after walking out of a psychiatric hospital has been sent to the State Hospital indefinitely.
David Reid stabbed Mark Johnston more than 120 times at a flat in Broughty Ferry, Dundee, believing the devil told him to kill his victim.
Reid had discharged himself from the Royal Cornhill Hospital in Aberdeen.
The 46-year-old was previously found not guilty of the killing by reason of insanity.
Judge Lady Rae ordered Reid to be detained in the State Hospital at Carstairs on a compulsion order and a restriction order.
'Messages from God'
A previous court hearing was told that Reid had answered the door to police covered in blood.
He told officers: "I feel terrible. The devil told me I had two hours to stab him.
"I got a knife from the kitchen and sat there.
"He was my only friend. I can't believe what I've done. I stabbed him. What will his family think?"
The court was told that Reid told a psychiatric nurse in Dundee that he was receiving "messages from God."
A decision was taken to admit Reid to hospital and two NHS Tayside staff escorted him in a taxi to Aberdeen because no psychiatric beds were available locally.
Reid discharged himself shortly after admission.
The High Court in Glasgow was told an an inquiry was under way into the circumstances surrounding the case.