Allan Corcoran, described as a high-risk sex offender at Jedburgh Sheriff Court, pleaded guilty to possessing and downloading child pornography and breaching a sexual offences prevention order by having a mobile phone without the knowledge of his supervising officer.
Those offences were committed at his home in Blackhills Close in Jedburgh between October 16 and December 19 last year.
One phone sim card alone was found to contain 12,347 indecent images of children and 1,456 movies.
The court was told that the images had been organised into folders and covered all categories, including the most extreme classification.
Tessa Bradley, prosecuting, told the court that Corcoran had been subject to a high level of supervision since his release from prison because he was assessed to be at high risk of reoffending.
Corcoran’s home was searched on December 19 following a tip-off that he was breaching the conditions of his order.
Defence lawyer Ross Dow said his client recognised he had a serious problem.
Sheriff Peter Paterson told Corcoran: “These are serious offences, and that is only underlined by your previous convictions.”
He called for background reports but warned that a custodial sentence, possibly a lengthy one, is inevitable and added that the case might even be referred to the High Court as it has tougher sentencing powers.
Sentence was deferred until May 13, and Corcoran was remanded in custody.
Corcoran was jailed for two years in 2016 at Jedburgh Sheriff Court for downloading and distributing indecent images of children.
He also admitted sending messages containing sexual content from a house in Kelso’s Cross Street to a 15-year-old girl and engaging in sexual activity with her at the Pavilion Cinema in Galashiels.
As well as being jailed, Corcoran was put under supervision for four years and told his name would be on the sex offenders’ register for a decade.