A 31-year-old man was caught out by a vigilante group after telling someone he thought was a 13-year-old girl that he wanted to have sex with her.
Neil Murray admitted sending messages of a sexual and indecent nature to the girl, supposedly called Beccy, including a picture of his private parts.
However, Selkirk Sheriff Court was told that he was really communicating with a group targeting sexual predators by setting up fake profiles on social media platforms.
He pleaded guilty to committing that offence at a house in Glenburn Avenue in Newtown in April and May last year.
Sentence has been deferred until next month for background reports.
Murray’s name was placed on the sex offenders’ register in the meantime.
Procurator fiscal Graham Fraser described how a fake profile was set up in the name of a decoy called Beccy posing as a 13-year-old girl and it included a picture consistent with someone that age.
He explained: “The accused got in touch with her by waving at this girl Beccy with a Facebook request.”
Mr Fraser said initially the messages were harmless, asking how she was feeling, but she then asked how old he was, and he replied that he was 30, 17 years older than her.
They continued to exchange messages via Facebook Messenger, with Murray saying he worked as a school janitor and asking the girl he believed to be Beccy for her phone number.
The fiscal said that on April 13 last year Murray made contact via WhatsApp introducing himself as Neil from Facebook.
A conversation took place between the pair, and he said that if was ever in Hawick he would come and see her, stating that he was single and asking if she was too.
Mr Fraser said Murray was saying things such as that he wanted to join her in the bath and would wash her back.
He also told her several times that he loved her and asked her if she would like a serious boyfriend, only to be reminded that she was ostensibly 13.
The court was told Murray would then say what they would do when they met and that he wanted to have sex with her and for him to show her how to go about it.
Murray is then said to have made a “possible arrangement” to meet her, referring to that tryst as a date and a chance “to go somewhere private to have sex”.
The court heard how Murray then offered to send her a picture of his penis and asked her to send a photo in return.
Mr Fraser said: “He told her he would make her feel like an adult when she had sex.”
Murray followed that up by asking the decoy if she wanted to see his penis, prompting a reply that it was up to him.
Mr Fraser said there were six messages about having sexual relations from Murray and a similar number from the decoy saying she was only 13.
After their conversations were brought to the attention of the police, Murray told officers: “I am guilty of doing it.”
The court heard that he gave a “comprehensive explanation” of what had happened, and an examination of his phone confirmed the information would be available.
Murray, of Roxburghe Place in Newtown, pleaded guilty to a charge of attempting to send a sexual communication to a girl aged 13, namely messages of a sexual and indecent nature.
Not-guilty pleas to three other charges including arranging to meet up with Beccy and another underage girl called Kayla to engage in unlawful sexual activity were accepted by the crown.
Sentence was deferred until June 3 for the production of a criminal justice social work report and a restriction-of-liberty order assessment.
How long Murray’s name will remain on the sex offenders’ register will be determined when he is sentenced.