Steven Keith could have been locked up after police found the haul of illegal images in the homes he shared with his mum and stepdad in the town.

Keith's sentence was previously adjourned because staff at the Pathways Partnership Project, a group that deal with sex offenders in Renfrewshire, were unable to complete a report on him in time.

Police had raided his home in Mains Drive after arriving at the property on July 7, 2014.

Keith, his mum and stepdad were all at home at the time and officers read out a search warrant telling the trio they were there to seize any devices capable of accessing the internet.

Andrew Lazzarin, prosecuting, previously told the court: "The accused said, 'I have my own laptop and PC upstairs in my room'."

The items were seized by police and examined by computer experts, showing that search terms associated with child pornography had been used on the laptop.

Keith, 41, was detained and made no comment, before giving a no comment interview and remaining silent when cautioned and charged.

The computers were analysed further and experts found 2,638 indecent images of children on Keith's laptop.

Lazzarin said there were 1,605 unique images and that the remainder of the 2,638 images were duplicates, adding: "This was most likely due to the deletion of the images in question."

Sheriff David Pender was told that all of the images had been deleted from Keith's laptop and were categorised at level one - the tamest there is.

They featured girls aged between eight and 15 in provocative poses and Lazzarin said they were most likely downloaded via a file-sharing application.

Of the images found, four were pornographic films, while the rest were photographs.

Sheriff David Pender called for Keith to be assessed by social workers ahead of sentencing, adjourned the case for that to be done and released Keith on bail.

And, when he returned to the dock this morning, he was spared a prison term.

Sheriff Pender made Keith the subject of a Community Payback Order which will see him supervised by social workers for the next three years.

As part of the structured punishment he is also required to complete 240 hours' unpaid work over the next nine months and was placed on the Sex Offenders' Register for three years.

Keith is also banned from owning any device which is capable of accessing the internet.