An Ipswich teacher accused of having conversations about sex with girls he thought were as young as nine was arrested after he was confronted by members of a paedophile hunter group at his home, a court has heard.

Richard Cook, 48, allegedly told an undercover officer pretending to be a 13-year-old girl that he wanted them to be boyfriend and girlfriend and arranged to meet her at the entrance of Christchurch Park.

In conversations with the decoy child, which had quickly turned sexual,  he said he loved her and outlined what he wanted to do to her when they met up, said Nicola May, prosecuting.

He had allegedly asked her if she had explored her body and asked her to send him pictures of herself in her school uniform.

He had also allegedly sent her a video of a man performing a sexual act, said Miss May.

She said that although Cook had allegedly arranged to meet the girl at Christchurch Park on August 2 2019 the meeting didn’t happen as members of a paedophile hunter group had already intervened and confronted Cook at his home at the end of July.

This had arisen out of Cook’s alleged conversations with a member of an online paedophile hunter group posing as a nine-year-old girl.

Members of the group traced Cook to an address in the Nacton Road are of Ipswich and confronted him there, said Miss May.

The group alerted the police about what they were doing, and Cook was arrested.

Officers seized his phone and when it was analysed they found more than 40 indecent images and videos of children on it, said Miss May.

Cook, now of Lambert Lane, East Cowes, has denied one offence of attempting to cause a child to watch a sexual act, three offences of attempting to cause a child to engage in sexual activity and an offence of arranging or facilitating a sex act he intended to do, namely engaging in penetrative sexual activity with a girl under 16.

All the offences relate to conversations he allegedly had with adult decoys posing as three girls aged between nine and 14.

The offences are alleged to have been committed in July 2019.

Cook has also denied three offences of making indecent images of children on or before July 29 2019.

The charges allege that he made one indecent image and five videos in the most serious level A category, three images and 10 videos in category B and 19 images and five videos in the least serious level C category.

The court heard that following his arrest Cook categorically denied sending the messages to the decoys posing as children and said his phone had been hacked.

He denied downloading the indecent images and videos of children found on his phone and said his interest in children “started and stopped with teaching them”.

The trial continues.