A SOFTWARE engineer who bought a Glock handgun and silencer online was jailed for five years today.

Law enforcement forces in Scotland and America co-operated to thwart David Mitchell, 48, who purchased the firearm and 150 rounds of ammunition after searching on the dark web and asked for them to be delivered to his work in Dunfermline.

However, he ended up taking delivery of a package mocked up to look like the original after US Homeland Security intervened.

The High Court in Edinburgh heard that a Homeland Security special agent intercepted the original parcel at Newark airport in the USA on September 17 last year which was addressed to Pitreavie Court, in Dunfermline.

It was found to contain an amplifier but hidden inside the item was a fully operational Glock handgun, a sound suppressor and bullets.

The judge, Lord Pentland, told Mitchell: "These offences arose from your planned and deliberate conduct in attempting to acquire a working Glock pistol and a quantity of suitable ammunition.

"It appears you formed a plan to obtain these items by carrying out research on the dark web."

The judge said he noted that Mitchell said he had no intention to cause harm to anyone but they were serious offences.

Advocate depute Liam Ewing earlier told the court that following the find a joint operation was set up between Police Scotland and the National Crime Agency to create a package containing metal and wood to mock up the original.

Mitchell was put under surveillance and a cardboard box was delivered to his workplace in Dunfermline.

Mr Ewing said: "The accused was seen signing for and taking delivery of the package. Later that day the accused was observed exiting the premises and placing the box in his car before driving home."

Firearms officers later turned up at Mitchell's home in Damside, in Edinburgh. He told them: "There is something under the chair in the living room and something in the recycling bin in the kitchen."

The mocked up package was discovered under the chair and the amplifier and packaging were in a recycling box.

Mitchell was told that a search would be carried out at his workplace but he said: "There's nothing there anyway."

The prosecutor said that Mitchell "appeared distant" and was staring into space. He said that he suffered from depression and took medication for the condition.

Mr Ewing said officers were concerned about his mental health and arranged a medical examination. A psychiatrist confirmed that he was fit to be interviewed.

The pistol, silencer and bullets found at Newark Airport, in New Jersey, were sent to Scotland to be examined by ballistics experts.

The gun was found to be in working order but the silencer was not suitable for use with the Glock.

Mr Ewing said he had removed details of how the purchase was made from the narration for the court.

Mitchell, a prisoner in Perth, admitted purchasing and attempting to possess the pistol, silencer and ammunition between September 17 and 19 last year and attempting to possess a prohibited firearm.

Defence counsel John Scott QC said: "It is a very unusual case. In all respects he is someone your Lordship might never expect to see before a court."

He said he was assessed as posing little risk of reconviction.

He said Mitchell had "behaviour of a fixated nature focusing on a process" but has no serious mental illness.

Detective Chief Superintendent Gerry McLean, from Police Scotland's Specialist Crime Division, said: "David Mitchell tried to bypass Scottish, UK and American laws as he attempted to purchase a dangerous firearm and bring it into this country.

"The Organised Crime Partnership (Scotland), which launched on September 1, 2018, took on this inquiry and saw officers from Police Scotland and NCA using a range of specialist skills to investigate Mitchell before enforcement activity was conducted at two properties linked to him.

"His sentence should serve as a reminder that organised crime offences will not be tolerated.

"The OCP(S) provides an increased capability for the investigation and detection of organised crime and we look forward to this group garnering further success in bringing offenders to justice."

NCA regional head of investigations Rob Burgess said: “This conviction is an important milestone for law enforcement in Scotland, and results like this show what can be achieved by close working between the NCA and Police Scotland.

“There is a strong link between illegal drugs supply and the use of firearms, with criminals seeking them to intimidate rivals and enforce control of criminal operations.

“This is why preventing the type of weapon Mitchell tried to buy from reaching the streets is a priority for law enforcement nationally.

“The operation of the OCP(S) gives us new avenues and opportunities to tackle organised crime in Scotland, and those involved in that type of criminality should be fearful. We will be relentless in pursuing them.”

Andrew Laing, Deputy Procurator Fiscal Specialist Casework, COPFS said: “The Organised Crime Partnership (Scotland) demonstrates the ability of the police, the NCA and prosecutors to investigate, prepare and prosecute serious and organised crime of this nature and the partnership will play a vital role in keeping our communities safe.

“This was an organised and premeditated effort to bring an illegal firearm, ammunition and silencer into Scotland and the conviction and sentence granted for David Mitchell sends a strong message to others that this kind of criminal behaviour will not be tolerated.

“The Crown will continue to work with the police NCA and other partners to ensure that such crimes are investigated and those responsible are prosecuted using all measures at our disposal in order to reduce the harm caused by serious crime.”