Peter Martin has been jailed for 17 months at Selkirk Sheriff Court after pleading guilty to offences involving indecent images of children.
The 66-year-old, from Peebles, admitted downloading the material while [private details withheld].
He further admitted possessing indecent photographs of children.
Police had been carrying out general monitoring when they visited Martin at temporary accommodation in Peebles and inspected several of his devices.
Investigators found searches relating to young boys on both his phone and laptop.
Procurator fiscal Graham Fraser said forensic examination of the laptop identified 3,284 indecent images.
A total of 131 were Category B images, with the others falling into Category C, described as the least serious classification.
Martin's lawyer, Mat Patrick, said his client had been remanded in custody since July 3 and had not been enjoying good health.
He said there had been no effort to organise the images into folders or share them with anyone else.
The court backdated the prison term to July 3, and Martin's name will remain on the Sex Offenders Register for a decade.
Help keep this record accurate
Suggest an update or report a problem for admin review.