A Lyneham man will be sentenced next month after he admitted sending vile messages to what he thought was a 12-year-old girl.

Wearing a suit and tie at his hearing before Swindon magistrates on Wednesday, Mathew Carlsson, 49, of Church Farm Mews, Lyneham, pleaded guilty to attempted sexual communication with a child, arranging the facilitation of a child sex offence, distributing indecent images of children and making indecent images.

Prosecutor Kate Prince said Carlsson had been engaged in discussions online with what he thought was a 12-year-old girl. The “girl” was an undercover police officer.

The pair had discussed meeting up in order to have sex.

Police seized his computer equipment, on which they found three indecent images of children in the most serious category, A, which includes depiction of child rape, three images in category B and 29 in category C.

Analysis of Carlsson’s digital devices also showed he had distributed an indecent video in category A and a photograph in category B.

Magistrates bailed him to appear before the crown court on September 15 for sentence. They ordered a pre-sentence report.

Mark Glendenning appeared for Carlsson.