A former police officer who concocted an elaborate plot to steal from a Bradford bingo hall by claiming he was an undercover detective has been jailed for four years.

Matthew Brakewell told staff that he was on a covert mission and, when he was caught, aimed an imitation handgun at two police officers to try to avoid arrest.

Jailing Brakewell yesterday Judge Linda Sutcliffe said the use of the gun aggravated the offence as it was committed not long after PC Sharon Beshenivsky was gunned down in Bradford.

The city's crown court was told yesterday that Brakewell, who served in the Greater Manchester Police and the Isle of Man force, had got away with a similar crime at the Mecca Bingo Hall on Smith Street, Rochdale, only a few weeks earlier on September 22 this year.

He used a false name and told the manager that he was a detective inspector working on Operation Phoenix.

Brakewell, 29, said that a gang of armed robbers were targeting bingo halls and that the Mecca could be next on their list.

Describing what the gang were like Brakewell said that they were armed with a shotgun and would fire a round into the ceiling before taking a member of staff hostage.

Brakewell, whose wife is still a serving officer on the Isle of Man, got manager, June Kay to sign official looking forms and said that he needed to put tracking devices into a cash bag.

He was then shown to the office where the safe was kept where he said that he needed to borrow a screwdriver to fix one of the devices.

Once he was left alone he made off with £2,000.

But he was caught on CCTV and his image was circulated to other bingo halls in the area.

Then on October 2 he made his way into the Gala Bingo Hall in Tong Street, Bradford.

Again he gave staff the same phoney tale, but was recognised by manager Sean Connolly who phoned the police.

Mr Connolly tried to keep him talking until police arrived but suddenly Brakewell said that he had to go and told Mr Connolly 'stay back if you know what's good for you'.

As he got outside, the police officers arrived and started to chase Brakewell at which point he produced the handgun, pointed it at them and warned them to back off.

Prosecutor Heather Gilmore told the judge that both the officers, Daniel Stocks and Steve Mullaney, feared for their lives.

Realising the seriousness of the situation Brakewell put the gun behind a parked car and came out with his hands up.

He was arrested but denied that he had been planning to steal cash from the Gala Bingo Hall. He told police that he was in the process of setting up his own security firm and had been testing the hall's security systems.

But at an earlier hearing last month Brakewell, of Bridge Bank Road, Smythbridge, Manchester, pleaded guilty to charges of possessing an imitation firearm - a Gloch semi-automatic pistol - with intent to cause fear of violence and burglary.

His barrister Stephen Wood told the court that his client was £20,000 in debt and came from an honest, hard working family. He added that the case had been headline news in the Isle of Man which had made things very difficult for his wife and young child.

Passing sentence Judge Sutcliffe said that she had never heard of a case like it before.

"It was elaborate and sophisticated in its planning," she told Brakewell.

She added: "It must have been absolutely terrifying for the people who thought that there was going to be an armed robbery at those premises. You told them that somebody was going to come in with a shotgun and that a shot was going to be fired into the ceiling and that someone would be seized and marched to the safe."

After the hearing, Detective Inspector Stephen Hopwood said that PC Stocks and PC Mullaney were to be commended for their bravery by the Assistant Chief Constable.

He praised Mr Connolly for his "prompt and quick-thinking action" that led to the speedy arrest of Brakewell.

Det Insp Hopwood said: "Any possession or use of a firearm is a serious matter, whether it's real or imitation. Brakewell was in possession of a gun which he used to threaten the officers who had been called to deal with the situation. Thankfully the matter was resolved without serious incident and Brakewell has been dealt with accord ingly.

"It should serve as a warning that crimes involving the use or threat of guns are dealt with very seriously."