A man has appeared in court charged with sending indecent messages to 'a child' online and with attempting to meet them in Ayr.
David Hunter, 57, has been bailed after a 'sting' operation by members of the public.
He appeared in private at Ayr Sheriff Court on Thursday.
Hunter had been arrested outside the same building on Wellington Square on Wednesday following a sting involving members of the Irvine-based 'Team Shades' group.
Hunter, whose address was listed as South Ayrshire, faced a charge of communicating indecently with an older child in breach Section 34(1) of the Sexual Offences (Scotland) Act 2009.
He faced a second charge of meeting a child following certain preliminary contact, in breach of Section 1 of the Protection of Children and Prevention of Sexual Offences (Scotland) Act 2005.
He made no plea to either of the charges, and was committed for further examination and released on bail.
He will return to court at a later date.
A Police Scotland spokesperson said: "A 57-year-old man has been arrested and charged with communications offences after officers were called to a disturbance on Wellington Square, Ayr, around 6.30pm on Wednesday, March 30.
"He was due to appear at Ayr Sheriff Court today."
Comments: Our rules
We want our comments to be a lively and valuable part of our community - a place where readers can debate and engage with the most important local issues. The ability to comment on our stories is a privilege, not a right, however, and that privilege may be withdrawn if it is abused or misused.
Please report any comments that break our rules.
Read the rules here