Prosecutor Christopher Dunn said Phillips had been jailed for two years in July 2014 when he was convicted of inciting a girl aged under 16 to engage in sexual activity.

He received a further 15 month jail term in May 2017 when he breached the terms of his sexual offences prevention order by sending indecent images to an underage girl.

Chris Aspinall, mitigating, said Phillips had pleaded guilty, admitted his offences to police from the start and fully accepted his intention was to have sex with ‘Becky’.

He said this level of acceptance marked a change in behaviour and might be a sign of “light at the end of the tunnel”.

Phillips, of The Crofts, Heckmondwike, admitted attempting to incite a child to engage in sexual activity, attempting to meet a child following sexual grooming, attempting to have penetrative sex with a child and breaching a sexual offences prevention order.