A man is behind bars after US security officials found a gun hidden in a jukebox.
Robin Baxter agreed to store the firearm for a mystery person he met on the dark web.
A Glock handgun and bullets was to be delivered to his home in Pentland Crescent, Aberdeen.
But, Homeland Security in the United States intercepted the package before Baxter ended up arrested by police in Scotland.
The 49-year-old first offender is now behind bars after he pled guilty at the High Court in Glasgow to attempting to acquire and have in his possession a firearm and ammunition.
Baxter will be sentenced later this month.
Prosecutor Alan Mackay told how Homeland agents in the US state of Louisiana inspected a package addressed to Baxter’s home last June 27.
As well as the firearm, a red dot laser sight, sound moderator and 200 bullets were also hidden inside a Bluetooth music jukebox.
The items were seized and a replacement ‘placebo’ package was instead sent to Scotland.
Baxter was later clocked accepting this parcel at his front door before being arrested in Fraserburgh, Aberdeenshire.
He initially denied any knowledge of a delivery to his home.
But, Mr Mackay told the hearing: “During a second interview, he then admitted he had been buying cannabis through the dark web.
“He had agreed to take in the parcel as a favour to the individual who had sold him the cannabis.
“He was in debt to this person for £2,500 and had agreed to accept the parcel.
“He was told a Glock handgun had been ordered to his address.
“He had Googled what a Glock was and realised that it was a firearm.
“He stated that he had never met this person before and had only ever contacted him through the dark web.
“He had been told to keep the parcel and arrangements would be made to collect it.”
The American-made gun which was seized was described as “fully functional” and in “good as new” condition.
The court heard it was accepted Baxter was not the person who had purchased the weapon and other gun parts.
Lord Richardson remanded Baxter in custody as sentencing was deferred for reports until May 26 in Edinburgh.