A Kirkcaldy shopkeeper feared for his life after masked robbers warned him he would be shot if he pressed a panic alarm.
A gun was pointed at the head of Fazal Sindhu, who was working alone during the raid before the men fled with cash.
CCTV footage of the robbery at Malkha’s News, Food and Wine Store in the town’s Birnam Road was shown to a judge at the High Court in Edinburgh on Tuesday.
Lord Pentland said it gave ‘‘a vivid depiction of what must have been an utterly terrifying event.”
The judge noted the pistol was pointed straight at the victim’s head.
Former window cleaner Sonny Gibson (26) of Templehall Avenue and unemployed Jay Johnstone (21) of Appin Crescent, both Kirkcaldy, admitted assaulting Mr Sindhu on July 1 at his store and robbing him of cash.
The court heard that police later found Gibson in a vehicle at a petrol station in Kirkcaldy, but he claimed that he had been in Lochgelly.
The prosecutor said that Mr Sindhu had been stocking a fridge at his shop when the pair came in with their faces covered up and wearing gloves.
He saw the taller of them, Gibson, had his arm extended and was pointing a gun at his head with his index finger close to the trigger.
The advocate depute said Gibson shouted “Open the till” but Mr Sindhu at first thought he was joking.
But the shopkeeper became alarmed when he repeated the demand and added: “Don’t press any panic buttons or I’ll shoot you.”
Johnstone took money from the till and once it was empty both raiders fled from the shop.
Customers came in to ask Mr Sindhu what had happened and found him in a distressed state.
The advocate depute said: “Mr Sindhu thought that somewhere in the region of £900 was taken during the robbery.”
The prosecutor said the incident had greatly affected Mr Sindhu. She added: “He no longer feels safe working in the shop on his own.”
Lord Pentland deferred sentence on Gibson and Johnstone for reports.
He remanded Gibson, who has previous convictions, including serious assault, and Johnstone, who also has a record including assault and robbery, in custody.
>> Court round-up: P17