An Irvine dad who groomed what he thought was a 12-year-old girl – after being stung by an online group targeting paedophiles – has avoided a jail sentence.

Garry Allmark, 46, was brought to justice with the help of a group known as the Scotland Anti Predator Alliance (SAPA).

Operatives from the group snared Allmark online while he was living at a flat in Glasgow Street, Ardrossan with his wife and eight-year-old son.

They then arranged to meet him and confronted him over the vile messages he had sent to one of their decoys during a meeting at Harvie’s.

He sent the ‘child’ so many messages SAPA operatives gave police 410 pages of print outs showing his texts.

The details emerged previously when Allmark, who now lives in East Road, Irvine, appeared in the dock at Kilmarnock Sheriff Court for a pre-trial hearing.

He struck a deal with prosecutors which saw him pleading guilty to one charge in exchange for another being dropped.

He admitted a charge under Section 23 and 24(1) of the Sexual Offences (Scotland) Act 2009 by attempting to have sexual communication with a young child, and sending sexual pictures and videos to what he thought was an underage girl.

The charge that was dropped stated he had tried to meet what he thought was an underage girl with the intention of having a sexual encounter with her.

Procurator Fiscal Depute Jo Cunningham explained: “Between March 30, 2018, and May 5, 2018, the ac cused had been in communication with a person whom he assumed was a child under the age of 13.

“The communication he had was, in fact, with the Scottish Anti Predator Alliance. Police, on receipt of the evidence, arrested the accused.”

When Allmark returned to the dock on Tuesday to be sentenced, Sheriff Elizabeth McFarlane placed him on a Community Payback Order which will see him supervised by social workers for three years and attending the Moving Forward, Making Changes Programme.

He was also placed on the Sex Offenders’ Register for three years and was banned from communicating with anyone under the age of 16, unless unavoidable in the course of normal daily life.

He must also notify his supervisor of any electronic devices he owns which can connect to the internet, and is banned from entering all schools, nurseries, playparks, leisure centres and public parks.