A man was found hiding in a cupboard with a handgun when police searched his house.
Bartosz Pawlowski, 31, a prisoner at Perth, said the gun – which was capable of firing flares and cartridges – was not in working order.
But firearms experts discovered it could be fired if the hammer was struck with a hard object.
Fiscal depute Nicola Gillespie told Dundee Sheriff Court that Pawlowski was hiding in a bedroom cupboard when police visited his home in relation to another matter in April and saw a handgun half concealed under a carpet.
“He stated it was a replica and not capable of firing,” said Ms Gillespie
“It was not in normal working order but a cartridge could be fired if the hammer of the gun was struck lightly by a hard object.”
Pawlowski admitted that he possessed a prohibited weapon, designed or adapted for the discharge of a noxious liquid or gas, cartridges or signal flares at Dundonald Street on April 17.
Pawlowski was one of four men who appeared in court in connection with break-ins at Dundee’s Technology Park and elsewhere in February.
However, his not guilty pleas to break-ins at Swan House in Explorer Road were accepted by the Crown.
Co-accused Dorian Czekaj, of Bonnethill Court, admitted breaking into Positive Steps at Swan House between February 24-26 and stealing mobile phones, a virtual reality headset, a camera, cable and data card, four hard drives, a projector and concert tickets.
He also admitted breaking into the business premises occupied by Solas at the same address on February 27 and 28 and stealing a laptop and cashbox.
Piotr Niemczyk, 32, of Morgan Street, admitted that he broke into premises occupied by Alexander Annan at Swann House and stole two paint brushes and a drill between February 26-28 and that he broke into the Elim Church at the same address and stole two guitars and a light assembly between February 1- March 26.
Grzegorz Gasiorowski, 26, a prisoner at Perth, admitted that between February 26-March 10 at Cash Converters, Whitehall Crescent, he reset a mixer which been stolen by housebreaking.
Sentence on all four was deferred until September 17.
Cjekaj’s and Niemczyk’s bail orders were continued while Pawlowski was remanded in custody.
Gasiorowski is serving a prison sentence and was ordained to appear.