A PERVERT who thought he was sending sexual messages to a 12-year-old girl was actually chatting to an undercover cop.

John McWhirter, 61, pleaded guilty to attempts to communicate with a child from his then address in Station Road, Drongan when he appeared at Ayr Sheriff Court last week.

McWhirter admitted sending messages of a lewd, indecent and sexual nature to someone he thought was a girl aged 12 called ‘Emma’ but in fact was an undercover police officer, on various occasions between May 8 and May 30, 2021.

McWhirter, who was represented by John Gallagher, pleaded guilty to attempting to send the messages for ‘sexual gratification or of humiliating, distressing, or alarming’ them.

Sentence was deferred for a criminal justice social work report and full risk assessment. McWhirter was also told he will be subject to sex offender notification requirements and will have to register at his local police station.

Bail was continued and McWhirter, now of Viewfield, Keith, will return to court at a later date.

Police Scotland can be contacted on 101; in an emergency always dial 999.