A brave police inspector was praised by a judge after tackling a man who had pointed a realistic imitation gun at a shop window.

Pavel Olah, 20, was captured on CCTV walking through Bradford city centre with what appeared to be a large black handgun in his hand.

Bradford Crown Court was yesterday shown footage of him walking with the gun past people in Centenary Square, waving the weapon in the direction of a car as he crossed a busy road, pointing it at a manhole cover as he passed the Alhambra Theatre, and then aiming it towards a shop window as he walked past.

The court then watched footage of Inspector Richard Baildon running up to Olah, grabbing hold of him and hitting him round the legs with his baton, before he was arrested.

Recorder Abdul Iqbal said: “The police officer who reacted to disarm you of what looked like a real gun is to be commended.”

The judge said Olah had been foolish and reckless.

He told the defendant: “It is ironic that the person in most danger of suffering serious injury was you, because if the police had responded with force it would no doubt have been an armed response unit with real lethal weapons, who would have been aiming them at you.

“You, walking through a city centre pointing the weapon towards locations where people were going about their normal business, may have led them to shoot at you to protect those innocent civilians.”

Olah, of Springfield Avenue, Scholemoor, Bradford, pleaded guilty to having an imitation firearm in a public place, on March 29 this year in Great Horton Road.

He was first seen walking down Ivegate with the black plastic gun.

Prosecutor Duncan Ritchie said Olah told police he had bought the imitation gun at a shop and had not appreciated how seriously it would be treated by police.

His solicitor advocate, Anne-Marie Hutton, said he realised how stupid he had been. She said the public did not seem to react to what he was carrying.

Recorder Iqbal said Olah had been showing bravado and acted aggressively walking through town with a weapon in his hand.

Olah was given a 12-month community order, with 200 hours of unpaid work, and ordered to pay £250 towards prosecution costs.

After the case, Insp Baildon said: “This man appeared to be waving a gun in the middle of the street. There was no way of determining whether the weapon he was carrying was real or not. Having being presented with the situation, my thoughts were around reducing the immediate threat to the local community.

“The potential danger he posed, coupled with the fear he was generating to those around him, left me no with option but to take action.

“It was clearly a nerve-wracking experience, not knowing whether this individual was genuinely armed.

“This man was extremely lucky that there was not a full firearms response.”