A 41-year-old man sent sexual messages to a 13-year-old girl not realising the recipient was really an undercover Metropolitan Police officer, a court heard.

Stuart Baker messaged the girl, who he believed was a 13-year-old called Jodie from London, making sexual comments and asking if she liked older guys, Norwich Crown Court heard.

Martin Ivory, prosecuting, said he also asked the girl to send him a photo unaware it was an undercover police officer, working for the Metropolitan Police, who he had been messaging.

Mr Ivory said there was a few messages exchanged between the pair and said: “That was the extent of the sexualised dialogue and a request to send him a picture.”

He said Baker used a false name to chat to the girl but when police came to examine the account they found it was Baker.

He said that police had raided his home and seized his devices.

Baker was arrested and when interviewed made full admissions to the police, the court heard.

Mr Ivory said Baker said he had consumed a lot of alcohol when he committed the offence and accepted he had overstepped the mark.

Baker, of Sadler Road, Hellesdon, admitted attempting sexual communication with a child between September 14 and October 11 last year.

The court heard he was of previous good character and had lost his job as a result of his arrest.

Judge Maureen Bacon said he had sent messages to someone he believed was a 13-year-old girl, who in fact was a fictional person.

She said he had been quite candid about what happened but accepted the matter had not gone any further.

Judge Bacon imposed a two-year community order, which she said was a serious alternative to custody.

She also made him subject to a sexual offences prevention order and placed him on the sex offender’s register for five years.

Rob New, for Baker, said he had been intoxicated when he had sent the messages and said: “This was always going to be a guilty plea.”

He added: “The consequences of these actions have already been significant. He has lost his job and he is struggling to find secure and reliable employment.”

Mr New said that Baker acknowledged his wrong doing and felt shame and embarrassment over the offence.