An internet groomer who tried to win a schoolgirl's trust by warning her about online "weirdos" was jailed today for three and a half years.

As soon as David Carey thought he had the girl's confidence, he began sending her increasingly suggestive emails.

He told her she was sexy, insisted they could have "fun together" and finally arranged to meet her in a park, London's Southwark Crown Court heard.

But the 42-year-old's hopes of turning fantasy into reality came to an abrupt halt when he turned up to discover the child was really a middle-aged undercover police officer.

He was arrested and his home in Chapel Park Road, Hastings, Sussex, was searched.

Jurors heard his computer contained a string of incriminating emails written to genuine children, search phrases like "teens abused" as well as a number of indecent pictures of underage girls.

Today, Judge Rodney McKinnon sentenced him to three and a half years jail for one count of attempting to meet a child following sexual grooming between August 13 and September 22 last year, trying to cause his would-be victim to watch a sexual act, and four offences of making indecent pictures of youngsters.

He also ordered that he be placed on the sex offenders register indefinitely and be disqualified from working with children indefinitely.

Carey had denied the charges and claimed he thought he had been chatting to a 16-year-old.

Judge McKinnon said: "It is clear you were obsessed with holding overtly sexually explicit conversations in internet chatrooms.

"It is quite clear in my mind in that you asked the girl the night before meeting her whether she was 14, that you expected to meet a 14-year-old girl and to have sexual intercourse with her.

"This police operation has helped prevent that happening."

The judge continued: "You pose a high risk of harm to children. Giving evidence, the officer in this case said you had displayed classic grooming tendencies."

Judge McKinnon also imposed a seven-year sexual prevention order, banning Carey from spending time or working with any young person under 16, allowing anyone under 16 into his home and using a computer for the purpose of accessing chatrooms, sending messages or file swapping.

Prosecutor Nicholas Mather told the five-day trial the defendant's child seduction campaign began when he warned what he thought was a schoolgirl: "You have to be careful. There are quite a lot of weirdos on the internet, but I'm not one of them."

He went on to bombard her with compliments, insisting she was "pretty" and that one day she would meet "someone nice", the court was told.

But, said counsel, it did not take Carey long to show his true colours.

His language became "more explicit" with each email until, finally, he wired her a picture claiming it showed an underage teenager performing a sex act on him, the court heard.

"Throughout his conversations he is setting out what he wants to do. The evidence is overwhelming that he had one thing in mind... to have sex with her," Mr Mather added.