Darren Osborne was a “ticking time bomb” who turned into a smiling murderer within weeks after becoming obsessed with killing as many Muslims as possible.

The unemployed father-of-four appeared “brainwashed” after viewing a BBC drama based on the Rochdale grooming scandal and finding material from the far-right online, according to his estranged partner.

The 48-year-old had not shown racist tendencies before Three Girls aired in May last year but began making comments about Muslims raping children and blowing people up in the weeks after, Sarah Andrews said.

The London Bridge attack and Manchester Arena bombing which followed soon after “seemed to fuel the rage inside him”, prosecutor Jonathan Rees QC told his trial.

Devices seized from the family home in Cardiff, where he would sometimes stay, showed internet searches for Britain First, the English Defence League and a video which claimed to show Muslims celebrating following the Paris terror attack.

It appeared to Ms Andrews that Osborne was becoming brainwashed, and with the benefit of hindsight she described him a “ticking time-bomb”.

Osborne had a history of violence and served two years in prison for assault. He had suffered alcohol and drug abuse and was on medication for anxiety and depression.

His trial heard that he had tried to kill himself twice in the lead up to the attack, but no psychiatric evidence was placed before the jury by his defence team.

After a decade of unemployment Osborne felt worthless and like an outcast, Ms Andrews said. He was a “loner and a functioning alcoholic” with an “unpredictable temperament”.

Police said he had a “dysfunctional family”, lacked a stable home and frequently sofa-surfed.

The night before the attack, he slept in a tent erected in his estranged partner’s garden.

A measure of Osborne’s unpredictability emerged part way through his trial, when he suddenly submitted a defence statement, followed two days later by another which contradicted the first.

It was here that Terry and Dave were first mentioned – the latter of whom he claimed was driving the van when it ploughed into worshippers in Finsbury Park.

But prosecutors dismissed this eleventh hour defence as “utter nonsense”.

Standing at times with one hand on his hip, the other on the witness box, Osborne seemed unfazed by the courtroom, though at times distracted.

He revelled in opportunities to spout his ideology and hatred towards Muslims, and told prosecutors he was not concerned when asked if he understood the severity of his predicament.

As he was cross-examined after giving evidence, he at one stage admitted he was “miles away” after struggling with a series of questions and later asked prosecutor Mr Rees if he was smiling at one of his answers.

Asked if he was “playing it for laughs” in front of the jury with his implausible account, Osborne said he was “at a loss” as to why the prosecution thought this might be the case.