A police support worker who downloaded more than 300,000 images of child abuse has been jailed for five years.
Barry Rankine, 32, from Dumfries, an IT officer, also abused his position to obtain information on vulnerable children and crime files.
He secretly copied photographs of youngsters in care, as well as their personal details, onto a USB drive.
Judge Lord Boyd said police security of the material had been “lax” but it was a “very serious breach of trust”.
Rankine, a first offender, admitted seven offences, which took place between 2007 and 2014.
The crimes included charges under the Data Protection Act, theft and possessing indecent photographs.
A police raid of his home at Rae Street, Dumfries, found 323,555 photographs and 4,289 films of children being sexually abused.
Lord Boyd said that when police searched Rankine’s home they found computer hard drives that were used in two court cases relating to indecent images of children.
“I am told there is no evidence to demonstrate that you accessed them,” he told Rankine.
He said police had also found a large number of hard drives and discs containing details of crimes, witness statements and other matters.
“It appears that you then copied it onto other systems and hard drives,” he said.
“I am told that such was the volume of information on the stolen items that it would have taken 100 years to view them all.”
Lord Boyd criticised the security and supervision of this material at Dumfries police headquarters as “lax”.
He added: “That, however, is no excuse for your very serious breach of trust.
“The public have a right to expect that information held by the police will be handled in a manner which respects their privacy.
“This is particularly true when the information relates to vulnerable children, reports of crimes and witness statements.”
‘Walter Mitty character’
Lord Boyd said that Rankine appeared to have two motives – addiction to pornography and an obsession with hoarding and processing data.
His defence counsel Frances Connor described Rankine as a “a fantasist and a Walter Mitty character” who had failed in his attempts to join the police force on a number of occasions and had taken an IT post as a civilian police worker.
Ms Connor said: “The police investigated at length to see if there was ever any contact with any of the children and were satisfied there was not.
“All the data he collected he stored.
“It was a compulsion.”
In addition to jailing him, Lord Boyd placed Rankine on the sex offenders register for 10 years.
Police worker had child abuse images
A police worker from Dumfries has admitted possessing indecent photographs of children.
Barry Rankine, 32, also abused his position to get confidential details about vulnerable children in care.
At the High Court in Glasgow he pled guilty to seven charges committed between 2007 and 2014.
They included crimes connected with the Data Protection Act and theft. He was remanded in custody and will be sentenced later this month.
Prosecutors said Rankine, an IT support officer, secretly copied a host of information – including photographs of the youngsters – onto a USB drive.
Among the offences he admitted was a charge that he illegally obtained information linked to a children’s residential home in Dumfries and Galloway in October 2010.
This was carried out at addresses including the police divisional headquarters in Dumfries.
Rankine, who no longer works for Police Scotland, also stole a number of items from the same building including laptops, hard drives and DVDs.
When he was caught, a hoard of indecent photographs of children and “extreme pornographic images” were also discovered.