A TRANENT man resorted to an armed robbery attempt after his life “spiralled out of control” due to gambling and drug problems, a court heard.

Graham McGowan turned up at a branch of the Co-op on Ormiston’s Main Street wearing a mask and armed with a firearm before threatening to shoot two employees.

McGowan brandished the weapon at the two male staff members and demanded access to the store’s safe during a terrifying incident in February.

Edinburgh Sheriff Court heard that McGowan had attempted the robbery due to “gambling debts and a lack of money” and he had been “abusing cocaine and alcohol” before the botched robbery attempt.

Solicitor Christopher Fehilly, defending, said his client, who appeared in court from custody, had been on “a 15-hour bender” prior to the incident and that he had “limited recollection” of the robbery.

Mr Fehilly added: “He asks me to apologise for the alarm and distress he has caused to the staff who were working and he is at a loss to explain his actions.

“His life had spiralled out of control.”

McGowan, 36, had previously pleaded guilty to possessing a firearm with intent to cause violence against two Co-op employees at the Ormiston Main Street store on February 19.

He also admitted to brandishing the gun at the two men, threatening to shoot them and demanding access to the safe during the same incident.

Last Thursday, Sheriff Frank Crowe admonished the gunman on the first charge but added: “[You face] a second charge of robbery with a weapon, a gun, and demanding access to a safe – the staff were rightly alarmed; in the circumstances a prison sentence is inevitable.”

Sheriff Crowe jailed McGowan for 18 months and ordered him to be placed on supervision for six months after his release. The extended sentence is designed to address McGowan’s alcohol, drugs and gambling addictions.