A MAN who thought he was having online sex chat with a 10-year-old girl has been spared jail, having his two-year sentence suspended and being put on a sex offenders programme.

Matthew Hall used the profile 'Dad of two' when he went into an internet forum for youngsters called Kidschat.

Once there, the 35-year-old showed 'grooming' behaviour as he tried to get the youngster to strip out of her clothes.

But in reality the pervert was communicating with a police worker who was patrolling the net to help catch paedophiles.

Hall, of Brecon Close, Melksham, pleaded guilty to attempting to engage in sexual communication with a child and making indecent images of children.

Hannah Squire, prosecuting, told Swindon Crown Court how the undercover officer was in the chat room aimed at children.

She said Hall first approached the decoy, who made her age clear, on May 1 last year and engaged in lengthy conversations.

He repeatedly pressed her to send him photographs of herself getting changed out of her school uniform.

Miss Squire said "She continually says 'My mum won't like it'. He said she won't need to know.

"There is classic grooming behaviour to get a child to send indecent images."

While talking to the child, Hall told her he was sexually excited and stimulating himself, the court was told.

He then encouraged her to sign up to other social media, including Kik Messenger, where he had the profile Max Power.

Miss Squire said when Hall was arrested he accepted what he had done and that on his computer officers found hundreds of images of child abuse.

Among the material was more than an hour of video with children as young as three being abused.

Nicholas Wragg, defending, said all the offending took place in a few weeks between March and June last year.

"He said he is truly ashamed of himself and indicated he was seeking personal support," he said.

He said that at the time Hall was using hard drugs and was caught talking to the officer at the same time his wife was noticed his addiction was getting out of control.

Mr Wragg said she gave her husband an ultimatum about substance misuse and he stopped taking drugs, including crack cocaine.

Mr Wragg said all of the images came to his client from a dropbox and though he deleted them, he then downloaded them again.

Passing sentence Judge Jason Taylor QC said "Without minimising what you did, you have done everything right since."

Imposing a suspended sentence he said "I take the view it will benefit the community in the long run and will certainly benefit you."

He imposed a two-year jail term suspended for 24 months with a sexual offenders programme, 200 hours of unpaid work and 20 days of rehabilitation activity requirement.