A paranoid schizophrenic who stabbed a former neighbour to death in the belief he was a witch who had captured his soul has been detained indefinitely.
Steven Dunne, of Chates Farm Court, Brighton, thought Gordon Stalker, 51, was controlling his mind and he could only be freed by killing him.
Dunne, 41, admitted manslaughter on the grounds of diminished responsibility.
A judge at Lewes Crown Court ordered him to be detained indefinitely in a medium-secure psychiatric unit.
Sentencing Dunne under the Mental Health Act, Judge Anthony Scott-Gall told him: "This was a dreadful crime made even worse by the fact that an innocent and decent man was stabbed for what were wholly irrational reasons."
He told Dunne that Mr Stalker befriended him at a time when his mental health had begun to deteriorate.
"He had no inkling at all that you were beginning to suspect him of controlling your thoughts and taking possession of your soul," the judge added.
The court heard the pair were neighbours in a shared house Elm Grove, where they were friends and often socialised together.
But Dunne's mental health deteriorated and he began to believe that Mr Stalker was a witch who had captured his soul when he took pictures of him on trips out.
He also had delusional thoughts that a team from the local housing departments were agents for Mr Stalker.
Dunne's behaviour became so erratic he was ordered to leave the property.
Mr Stalker got a restraining order banning Dunne from returning to the house and Dunne was found a new home.
In February, Dunne walked to Elm Grove and slashed Mr Stalker's car tyres with a knife.
Later, he knocked on the door and when Mr Stalker answered with just a towel around him Dunne stabbed him repeatedly in the communal hallway.
Psychiatrists said Dunne suffered from an acute form of paranoid schizophrenia at the time of the killing and was prone to relapse.
The court heard the decline in Dunne's mental health could possibly be traced back to a car accident in October 2000.
After the hearing, Det Ch Insp Trevor Bowles, of Sussex Police, said: "The court has heard about the depth of the illness which Dunne suffers from.
"The sentence passed today will not only serve to protect the public in the future, but will also ensure that this man who has a mental illness receives treatment over the years to come.
"What Steven Dunne did to Gordon Stalker that morning in February this year was a violent and wicked act. He stabbed Gordon with a terrible ferocity."