A man diagnosed with paranoid schizophrenia strangled his father and planned for his girlfriend to find the body, a court has heard.
The body of John Perry, 70, was found in his Southampton flat on 5 February.
Joshua Perry, 28, falsely believed his girlfriend was seeing his father, Winchester Crown Court was told.
Perry previously admitted manslaughter on the grounds of diminished responsibility and was ordered to be detained in hospital indefinitely.
Charles Gabb, prosecuting, said the son had suffered serious mental health episodes for at least four years, including an incident in which he was "caught trying to scale Big Ben".
Mr Gabb said Perry became "fixated" with the notion of the suspected affair, although there was "not a shred of truth in that".
He said on the day of the attack, Perry must have confronted his father at his home in Bursledon Road, before strangling him with a phone charger.
He then attended a meeting with two mental health workers, who were "completely persuaded" that he was fine, the prosecutor said.
Perry, from Southampton, subsequently texted his girlfriend and told her to meet him at his father's flat, although he was in fact not there, Mr Gabb added.
"This was a cruel hoax... payback time," the prosecutor said.
"What he wanted was for her to find the body."
The defendant then told his girlfriend, "You did this," the court heard.
'Contagious, hilarious personality'
In her victim impact statement the girlfriend said she had subsequently suffered from post-traumatic stress disorder.
Perry also previously pleaded guilty to possessing a lock-knife and amphetamines at the time of his arrest in London the following day.
The judge, Mr Justice Garnham, imposed section 37 and 41 hospital orders.
He said the defendant's mental illness had led to a "wholly delusional belief" about the affair and to the "cruellest of tricks" played on his girlfriend.
John Perry's family previously described him as a "father, brother, grandfather and raver" with a "contagious hilarious personality".