Dalgleish admitted downloading thousands of pornographic images
A man who downloaded more than 16,000 indecent images of children has tried to blame search engines for his crime.
William Dalgleish, 67, of Lockerbie, Dumfries and Galloway, admitted the offence after police raided his home.
Dalgleish's lawyer told the High Court in Glasgow that he had subscribed to an apparently legitimate news website and accessed the images through that.
However, the court also heard he had admitted being "sexually interested" in children. Sentence was deferred.
Susan Burns, defending, said Dalgleish felt the material was too easy to access.
"He feels that he would not have committed these offences if this information was not so freely available," she said.
"He feels if companies like Google did not provide access to such sites, he would not have committed the offences."
Dalgleish admitted downloading and possessing a total of 16,535 indecent photos and movie clips.
The court heard how police went to his home on 12 February this year acting on information given to them.
Officers seized his laptop computer and two separate hard drives.
Dalgleish later admitted trawling the internet for images of children of "a sexual nature".
Paul Kearney, prosecuting, said: "He admitted being sexually interested in children.
"He indicated that the bulk of this material related to children - male and female - aged between eight and 14 and that he understood that these images were of children being sexually abused."
The court was told that Dalgleish was jailed for two years in 2001 for indecent assault and placed on the sex offenders' list.
He was caught with the child pornography after a police detective had earlier compiled a report on him claiming he was at "low risk" of re-offending.
Ms Burns said Dalgleish had become a recluse prior to being arrested as he "recognised he had a problem with young girls".
"He feels very sorry," she said. "He did something to rid himself of human contact, but he, in turn, accessed these images."
Lord Brailsford deferred sentence until next month for background reports.