A man who later said he was having delusions about kidnappings and paedophiles killed three men hours after being released from custody, an inquest has heard.
Alexander Lewis-Ranwell was still wearing the grey tracksuit he had been issued while under arrest the previous evening when he killed Anthony Payne, 80, and 84-year-old twins Dick and Roger Carter in Exeter on 10 February 2019.
He had been arrested and released from custody twice in the two days leading up to the killings, jurors at Exeter County Hall heard.
Det Sgt Martin Sutcliffe said Lewis-Ranwell later said he was having delusions about "people being either trapped, kidnapped or held against their will" and was feeling a compulsion to help.
Sutcliffe, who was the deputy senior investigating officer, took jurors through a timeline of the case starting with Lewis-Ranwell's birth in 1991.
He said Lewis-Ranwell, now aged 35, had been detained on two separate occasions under the Mental Health Act in 2016 and 2017.
He described an incident during the first hospitalisation in which Lewis-Ranwell set fire to a rubbish bin and how the second period of detention followed a police chase on a road in London, which included a helicopter being deployed.
Sutcliffe said that incident resulted in convictions for dangerous driving and failing to provide a specimen, which would have been information available to officers in 2019.
More news stories for Devon
Listen to the latest news for Devon
Jurors heard about an incident at the Castle Inn in Combe Martin, Devon, at about 00:50 on 8 February 2019 which resulted in the landlord calling 999 to say Lewis-Ranwell was refusing to leave.
Body-worn camera footage of officers attending the incident showed Lewis-Ranwell complaining about his bike being stolen.
During the footage, one of the officers can be heard saying about Lewis-Ranwell: "He's not right, is he?"
The inquest heard the same officers were called to Lee Meadow Farm a short time later where the farmer was reporting his bike had been stolen – the bike Lewis-Ranwell had been complaining about at the pub.
They quickly realised the burglary suspect was the man they had spoken to at the Castle Inn.
In camera footage, an officer commented: "He's not in his right mind, is he? We could have a look around Combe Martin. He's going to cause mayhem this bloke."
He later added: "It's mental health, isn't it?"
Sutcliffe said Lewis-Ranwell had been arrested later that morning at another farm where he had a confrontation with a woman who had arrived to take care of her horse and found him grooming it.
She said he was "having a whale of a time", had mucked out the stable and just calmly looked at her while picking the horse's feet.

Delusions Preceded Exeter Triple Killings, Inquest Hears