A sex offender sailor has been banned from going into parks or play parks after being caught hoarding child abuse images.
Gordon Gray, who has been in the Merchant Navy for 19 years, stockpiled thousands of files during Scotland's first coronavirus lockdown.
A court heard he downloaded and hoarded horrific videos of toddlers being raped and babies and young boys being sexually abused.
The 37-year-old kept nearly 5,000 files on an Asus laptop which was sitting on his bed when police officers arrived to investigate.
The stash of 4,779 images was built up between February 15 and October 22, 2020, Kilmarnock Sheriff Court heard.
Between March 23 and May 29, Scotland was the subject of lockdown restrictions, to stop the spread of the deadly Covid-19 virus.
Gray, of Ardrossan, North Ayrshire, returned to the dock yesterday to be sentenced, having earlier pleaded guilty to two charges.
He had admitted downloading indecent images of children and being in possession of the illegal files - in breach of the Civic Government (Scotland) Act 1982.
After hearing that Gray may lose his job as a result of the conviction and the fact he was being placed on the Sex Offenders' Register, Sheriff Murdo Mactaggart spared him jail.
He placed him on a three-year-long Community Payback Order which will see him supervised by social workers.
He also has to attend the Moving Forward: Making Changes programme, which seeks to help sex offenders change their ways.
He also placed Gray on the Sex Offenders' Register for three years and made him the subject of a conduct requirement, limiting his freedoms in the community.
The conduct requirement means he is not allowed any unsupervised conduct with anyone under the age of 16, unless it has been signed off by his supervising social worker.
He is also not to enter parks of play parks where he believes children may be, unless his social worker lets him, and his use of electronic devices will also be monitored.
And he has to notify those supervising him of his log-in details for his email and social media accounts and websites he uses, so they can keep tabs on what he is doing.
When he admitted his guilt, prosecutor Craig Wainwright said officers from Police Scotland obtained a search warrant for Gray's home "as a result of intelligence received".
He explained: "The accused was alone within the property.
"A search of the locus was carried out.
"A number of devices were recovered, but, in particular, an Asus laptop was on top of the bed in the bedroom.
"It was examined by officers of the Cyber Crime team. They recovered still and moving images."
Mr Wainwright said there a total of 3,161 indecent pictures, and 1,618 films had been downloaded, but all had been deleted.
Of the 4,779 files, 986 were assessed as being Category A images - showing the most extreme forms of child sex abuse.
He added: "They showed the sexual exploitation of male and female children aged between one and 14."
He said the films included a video of an 18-month-old boy being raped, a baby being sexually abused, and an eight-year-old boy exposing himself to the camera in a professional studio.
Don't miss the latest news from around Scotland and beyond - Sign up to our daily newsletter here.