A man with paranoid schizophrenia killed three elderly people due to delusional thoughts they were part of a paedophile ring, a court has heard.
Anthony Payne, 80, and 84-year-old twin brothers, Richard and Roger Carter were bludgeoned to death with a hammer and spade in Exeter on 10 February.
They were not involved in abuse but Alexander Lewis-Ranwell had thoughts they were, Exeter Crown Court heard.
The 28-year-old denies the murders on grounds of insanity.
Prosecutor Richard Smith QC said: "Mr Lewis-Ranwell was suffering from delusions on the day of the killings that there was an organised paedophile ring that was holding and abusing children.
"His victims, he deludedly thought were somehow involved in that.
"The victims (were) of course not involved in any such thing."
Mr Lewis-Ranwell did not dispute killing the men, jurors heard.
It was agreed in court his level of responsibility was reduced because he was suffering from a serious mental disorder at the time.
Jurors were told they would have to decide if he was guilty of manslaughter or not guilty by reason of insanity.
Mr Smith said when Mr Lewis-Ranwell did not take his medication he "could and did fall mentally ill" and at the time of the killings he was suffering from paranoid schizophrenia.
The judge, Mrs Justice May said: "The defence accept Alexander Lewis-Ranwell killed each of the three people named in the indictment in circumstances which if it were not for his mental illness he would be guilty of murder."
She said it was agreed between the prosecution and the defence that Mr Lewis-Ranwell's responsibility was reduced and at least to manslaughter.
The court heard he was arrested twice in North Devon in the days leading up to the killings and was released for the second time just hours before he attacked Mr Payne.