A gun fan has had his weapons seized after being caught with pictures of small girls in gymslips on his mobile phone.
Colin Mackenzie's home was searched after he took his mobile into a Vodafone shop for data transfer from an old phone to a new phone.
Falkirk Sheriff Court heard that an assistant manager noticed "images of concern" and contacted police.
Officers were waiting for him when he returned to the outlet in the Thistles Centre, Stirling, on August 12th 2020.
Police found 25 separate photos of young girls on his device, and a six minute "video montage" of girls aged aged 6 to 12 performing gymnastics.
Prosecutor Kristina Kelly said: "The video shows a gymnastics routine, at times zooming in on the genital areas of numerous young female gymnasts, each wearing a leotard.
"The user has zoomed in, on many of the shots, to the child's genitals."
There was also an image of a female child aged approximately 13 in a wet t-shirt, and a series of images of a child aged only four to five, each zooming in "ever-nearer to her genital area".
Police then raided Mackenzie's home in Tullibody, Clackmannanshire.
His gun cabinet - in a wardrobe in the master bedroom - was found to have a broken lock.
A side-by-side shotgun was in the unlocked cabinet, while a Beretta under-and-over shotgun was lying on the dining room table.
Officers also found a snap bag containing a tenth of a gramme of cocaine.
Mackenzie, 53, of Ramsey Tullis Drive, Tullibody, pleaded guilty to possessing child abuse images, possessing cocaine, and not keeping his shotguns secure in line with the terms of his firearms certificate.
Solicitor Virgil Crawford, defending, said: "A [background] report will be required."
As far as the guns were concerned, Mr Crawford said that the lock on the cabinet had broken only just before the police search.
He said: "I suspect Mr Mackenzie's shotgun certificate will be revoked."
Sheriff Simon Collins QC deferred sentence until June 29th for reports, placed Mackenzie on the sex offenders' register, and ordered the forfeiture of the firearms.
He said: "You are certainly not entitled to keep a shotgun on the dining room table."
Mackenzie hid his face as he left the court building, without commenting to a reporter.