A Fife security guard, caught trying to import a stun gun, claimed he was only going use it as a torch.
Steven Seath ordered the item online but it was seized by Border Force agents.
Seath, 37, of Fod Street, Halbeath, appeared in the dock at Dunfermline Sheriff Court.
He admitted ordering and importing an extendable stun gun from China.
Depute fiscal Azrah Yousaf said Seath had been employed as a security guard at the time.
Police received information about the gun being ordered and it was seized by Border Force officers on September 9.
It was addressed to Seath.
When questioned, he said: “I was mucking about on a website to see what I could get.”
Defence solicitor Stephen Morrison said: “He was on a particular website looking for a torch.
“He was fully aware of the stun gun capacity. He was holding down two jobs at that time as a security guard.
“This matter has proved extremely costly to him. His licence has been suspended and he is on benefits now,” he added.
Sheriff Alastair Brown said if Seath had wanted to buy a torch, he could think of a superstore and DIY chain situated within five minutes’ walk of the court building where he could have purchased one.
“He says this was a particularly powerful torch,” replied the solicitor.
The sheriff pointed out that he had previously imposed three-year jail terms for similar offences involving “stun guns disguised as a torch”.
He called for reports and Seath will be sentenced on March 11.