TWO masked robbers attacked a customer with chemical spray during a failed raid on the Yorkshire Building Society in Towngate, Wyke, a jury at Bradford Crown Court heard yesterday.

Alan Benson, who was at the branch counter, needed hospital treatment after the turpentine-like substance left him disorientated and with stinging eyes.

The robbers fled empty handed, pursued by two spectators at an under 12s match on the nearby rugby pitch, prosecutor Ian Howard said.

Mathew Deans, 34, is on trial denying attempted robbery at the building society at about 10.30am on Saturday, September 27, 2014.

The Crown alleges he was the taller of the two men, both wearing dark clothing and closely hooded tops, who aggressively demanded money before making off when the manager, Mark Palmer, activated the security shutters.

Mr Benson heard a voice demanding: "Give us the money," before he was shoved in the back and a jet of liquid sprayed into his face.

When the robbers had escaped, he was taken upstairs at the branch and bathed with water before paramedics arrived to take him to Bradford Royal Infirmary.

Mr Howard said Deans, a Bradford man, living in Queens Road, Beighton, Sheffield, was arrested after two green latex gloves were found nearby.

He alleged that Deans was caught on camera at the building society wearing similar gloves.

One was found by the police in a dustbin on Mayfield Rise, Wyke, and the other recovered from behind the building society. Both had Deans' DNA on them, the jury was told.

He was also linked to the offence by a white Hyundai car he hired in Sheffield five days before, Mr Howard said.

The vehicle was seen by a woman who saw the raiders fleeing past the rugby clubhouse, over a wall and down Mayfield Avenue, the jury was told.

Deans told the police he had never robbed anyone and it would have been stupid to use a car he had hired in his own name.

He said he smoked quite a bit of cannabis and could not recall what he was doing that day.

He did not hold an account at the building society branch and had never been in it.

Although he was not permitted to lend out the hire car to others, several men did use it and they may have taken the gloves out of it.

Deans said he had bought the gloves because he had been doing some decorating.

The trial continues.