A former magistrate has been jailed for 15 months for downloading more than 13,000 images of child pornography on his home computer.
David Thomas downloaded images of two-year-old children
David Thomas, 55, from Narberth, west Wales, admitted viewing pictures of children as young as two being sexually abused.
Retired tax inspector Thomas, who was said to be "addicted to the magic of the internet," pleaded guilty to five offences of possessing indecent images and 10 of making them over a five-year period.
Maggie Hughes, prosecuting, told Swansea Crown Court that police raided Thomas' home at Princes Gate, near Narberth, and seized two computers and bundles of CDs and floppy discs.
He gained some gratification from knowing he was doing something illegal and wrong
Maggie Hughes, prosecuting
Examination by a computer expert revealed 13,468 indecent images which fell into different categories of obscenity.
Miss Hughes told the court that the children pictured were aged between two and 13.
She said Thomas told police he had logged onto newsgroups which had directed him to sites from where he could buy images of child porn.
Miss Hughes added: "He gained some gratification from knowing he was doing something illegal and wrong.
"He is now disgusted with his actions."
Thomas' barrister, Geraint Walters, said the father of two had become depressed and quit the Inland Revenue because he was about to be promoted to London and did not want to leave west Wales.
He later set up an accountancy business but hated the work.
These offences perpetuate the abuse of children
"He became a solitary figure, a recluse in his own house," he added.
Thomas had become "addicted to the magic of the internet" and now could not believe he had been so foolish.
Mr Walters said Thomas' wife was "oblivious" to what he was doing.
The judge, Mr Justice Butterfield, jailed Thomas and ordered him to register with the police as a sex offender on his release.
"Some of these images showed assaults on very young children and depict acts that must have caused them distress and humiliation," he said.
"These are extremely serious offences. They perpetuate the abuse of children.
"You have heaped shame and disgrace on yourself and your family," he added.