A teenager stabbed a sales assistant 128 times after "a voice in his head" told him he was going to be attacked himself, a jury has heard.
Brian Healless, 18, killed Alex Davies, 18, in woodland at Parbold, Lancashire, when they met for the first time after chatting on dating app Grindr.
He denies murder but admits manslaughter on the grounds of diminished responsibility
Preston Crown Court heard he had been diagnosed as a paranoid schizophrenic.
Consultant psychiatrist Dr Matthew Appleyard told the court: "He said a voice in his head said the male was lying to him. Then they found each other and the male started to take his clothes off.
"The voice was saying the male was lying to him and was going to harm him. He felt in fear of his life and was petrified.
"He repeatedly stabbed him because he still believed he was going to be attacked."
Mr Healless explained he had taken a knife to the scene for his own protection, the doctor said.
The defendant tried to contact other men after the killing because he "just wanted to meet somebody".
'College drop out'
The court heard he was sexually interested in men and women but had never had a relationship.
Dr Appleyard said Mr Healless became isolated after he dropped out of contact with school friends at the age of 15, which he thought was the start of his illness.
He later quit college and stopped talking to his family or sitting down for meals with them.
Before his arrest, Mr Healless messaged four men on Grindr in the days that followed the killing and discussed meeting up with each of them.
He told two of them he could cycle to a rendezvous point halfway between their homes for "some outdoor fun", and mentioned finding a "discreet spot".
The trial continues on Monday