A man at a mental health centre was strangled by another patient who then set him on fire, a court has heard.
Carl Thorpe, 46, was found dead in his room at the Highgate Mental Health Centre in north London last year.
The Old Bailey heard Jordan Bramble, 22, is accused of his murder but is unfit to stand trial.
The jurors were told they will not have to return a "guilty" or "not guilty" verdict, but only to decide whether Mr Bramble carried out the attack.
The 22-year-old, who had a history of paranoid schizophrenia, will not be appearing in the dock during the proceedings.
'Compression of the neck'
Opening the prosecution case, Julian Evans said members of staff heard a fire alarm in the Coral Ward at 06:27 GMT on 3 February 2019.
They ran to Mr Thorpe's bedroom and "when they opened the door they saw smoke and flames", said Mr Evans.
The jury was told staff first pulled a mattress out of the room which was on fire and then Mr Thorpe's body was recovered.
A post-mortem examination found that the 46-year-old had injuries to his face and head.
He also suffered a "forceful prolonged compression of the neck" while he was still alive, and then "efforts had been made to burn parts of his body", Mr Evans said.
CCTV cameras showed the 46-year-old standing in his bedroom doorway at 06:04 with a sheet wrapped around his body.
Mr Bramble, who had a room in the same secure ward, was seen walking towards him and appeared to push him inside the bedroom and follow him inside, the court was told.
The 22-year-old then entered the room on five separate occasions over the next 23 minutes.
"It is the prosecution case that at some stage over the course of this 23-minute period, Jordan Bramble attacked Carl Thorpe in his bedroom," Mr Evans said.
The case continues.