A MAN has avoided jail after attempting to engage in sexual communication with an underaged girl, who was in fact an undercover police officer.

Robert Strachan, 38, of no fixed abode was charged with attempting to engage in sexual communication with a child under 16 for the purpose of obtaining sexual gratification between November 15 and November 27, last year.

Prosecuting, Lisa Bowles said the defendant used different chat platforms to make contact with a 14-year-old girl named Ellie from Scotland, who was actually an undercover police officer.

"The officer disclosed that it was an underage girl several times throughout the conversation. Nevertheless, sexualised language was used.

READ MORE: Man to be sentenced for sexual communication with child

"The defendant offered to come to Glasgow to meet the child. He said he would pick her up after school. He identified the date and what car he would be coming in."

Strachan was arrested on December 10, 2023. His phone and other devices were searched, but no sexual images were found.

Strachan pleaded guilty to the charge at Basingstoke Magistrates’ Court on Thursday, October 10.

Ms Bowles added that Strachan said in the police interview that he got sexual arousal from the online chats, but he never touched a child.

He also admitted that he sent pictures of his genitals to girls that he knew were underage, the prosecutor said.

In mitigation, defence counsel, Ned Sillett said it was an undercover police officer and there was no actual harm.

The defendant has no previous convictions.

His counsel added that Strachan was a former software engineer, who lost his job following a mental breakdown in June 2023. 

He also got separated with his wife and he has since been living on benefits.

"He now has osteoarthritis. He is living on his own and is isolated. He has depression and anxiety. He has no peers or friends because of this incident. He is someone who is struggling. He is motivated to change," Mr Sillett said.

He added that Strachan has expressed genuine remorse.

SEE ALSO: Basingstoke tenants concerned over SNG fence repair

Sentencing him at Winchester Crown Court on Friday, November 29, Judge Timothy Mousley said he feels that the defendant is genuinely remorseful and hence he wouldn't order a custodial sentence.

He was given a community order for 24 months. He has to complete an accredited programme and undertake 60 rehabilitation activities. He will be placed on sexual harm prevention order for five years.

He has to pay £1,000 as a financial penalty.