A court has heard how an apprentice electrician uncovered indecent images of children on his employer's laptop.
Police found more than 2,000 such photographs when they searched computers used by Richard Leith, 36, of Tranent, East Lothian.
He admitted having the images at two addresses in Greenlaw in the Borders between November 2007 and June 2010.
Jedburgh Sheriff Court heard some of the images found featured children of just a few months old.
His crimes were detected when the electrician got suspicious and checked a laptop Leith used for business.
Leith was placed on the sex offenders register and released on bail for reports to return for sentence on 26 May.