A judge praised the bravery of two police officers who tackled a psychotic gunman during a shooting incident in Elland.
Bradford Crown Court was told how 23-year-old Samuel Templeman believed he was the target of assassins in a film during the drama at the Perseverance Mill complex on Westbury Street in April.
Templeman had armed himself with an air rifle and he shot one of the residents Sam Callaghan in the left bicep after knocking on his apartment door.
PC Drew Wilson and his colleague PC Richard Thorpe arrived and found Templeman still armed with the weapon.
Prosecutor Ken Green said Templeman fired it at PC Wilson hitting him in the right upper arm but fortunately he was uninjured.
Eventually the officers restrained Templeman.
Templeman, of Westbury Street, pleaded guilty to charges of possessing an imitation firearm with intent to cause fear of violence and assaulting Mr Callaghan.
Judge Colin Burn was told that Templeman had spent 13 weeks in custody and after reading psychiatric reports he decided to make Templeman the subject of a two-year community order which includes a two-year mental health treatment requirement.
Templeman’s barrister Mrs Kitty Taylor said at the time of the incident the defendant was ‘’grossly psychotic’’ and believed he was in a film and was the target of assassins. He had been using drugs and had also been deprived of sleep.
Judge Burn said the officers’ actions were highly commendable and demonstrated great bravery.