A 31-year-old man who was involved in online sex chat with an undercover police operative posing as a 12-year-old girl has been given a suspended prison sentence.

Police in West Yorkshire were alerted by colleagues in the West Midlands about James Oliver’s online activity back in the summer of 2021 and he was sentenced at Bradford Crown Court after he admitted a charge of attempting to engage in sexual communication with a child.

Prosecutor Vincent Blake-Barnard said the undercover operative had set up the profile for the young girl and Oliver messaged her in July 2021.

When she told him she was 12 he said he was “old enough to be your dad”.

Mr Blake-Barnard said Oliver, of Lime Vale Way, Bradford, talked about sexually dominating a girl and suggested he would buy her underwear that her mother wouldn’t.

Oliver sent sexual photographs of himself to the girl and suggested “poses” for her to do if she took photographs of herself.

Oliver, who had no previous convictions, was arrested in October 2021 and claimed that he had been “role playing”.

He said he thought the person using the profile was 18.

Barrister Camille Morland, for Oliver, said at the time of the offending her client was living alone and socially isolated.

Recorder Patrick Palmer said Oliver’s offending was serious, but there had been no further offending in the last two years.

The judge decided to suspend Oliver’s 18-month jail sentence for two years and ordered him to do 250 hours unpaid work for the community.

Oliver will also have to attend an accredited programme and comply with 30 rehabilitation activity requirement days.

As a result of his conviction he must also register with the police as a sex offender for the next 10 years and abide by a 10-year sexual harm prevention order which restricts his contact with children under 16.

“This is your one chance. You won’t get it again,” warned Recorder Palmer.