A disgraced former Sunderland councillor who had explicit online sex chat with who he thought was a 12-year-old girl - then claimed it was 'jokey banter' - has been spared jail.
Paul Middleton, who represented the Washington South ward, believed the child was living in a care home when he sent the shocking messages to her in 2017.
But Newcastle Crown Court heard the 44-year-old dad had actually been communicating with a police officer, who was involved in an online operation to snare paedophiles.
The girl in the online conversations never existed.
Prosecutor Jonathan Devlin told the court Middleton had made contact with a profile in a chatroom and was told the user "Maddie" was "13 in the following April".
The conversation quickly became "sexually suggestive" and Mr Devlin said: "He asked Maddie what kind of fun she liked, asking whether that was naughty fun.
"She told him she lived in a care home."
Middleton asked the girl, in graphic terms, about sexual contact she had had with boys in the home, and, added Mr Devlin, "the conversation went on in that way".
The court heard as the chat became more explicit, the decoy teen described it as "gross".
Mr Devlin added: "He said any behaviour like that with him wouldn't be gross."
The court heard Middleton brought the conversation to an abrupt end. He sent her a friend request on a separate occasion, but there was no further correspondence between them.
The court heard Middleton was arrested last summer and said he could "vaguely remember" the conversation, but denied having any sexual interest in children.
Mr Devlin said: "He said it wasn't for sexual gratification. It was done in a jokey conversation way. He said he took a dim view of that sort of behaviour. "
Middleton - who is no longer a councillor and has since been expelled from the Labour Party - pleaded guilty to attempting to sexually communicate with a child.
Judge Tim Gittins sentenced him to four months' imprisonment, suspended for 18 months, with programme requirements and a three-month night-time curfew.
Middleton must abide by a sexual harm prevention order and sign the Sex Offenders' Register for seven years.
Judge Gittins told him: "It is difficult to imagine the circumstances in which it is appropriate for someone who doesn't know the child to be engaged in their social media, let alone going on to talk in the way that you did.
"One aspect of the short conversation causes me even more concern. That is, she said to you she was living in a care home, so you understood, as an intelligent man, she would have increased vulnerability as a result, had it been a real child.
"You weren't to know of the particular background that led to that child entering into a care home, you were prepared to joke about her being abused by boys within that home.
"You maintained it was jokey banter. Well, I refuse to accept that. It is ridiculous for you to try to suggest that the motivation of those sexual chats was done for anything other than of seeking to gain then, or thereafter in ongoing conversations, sexual gratification."
The judge said he accepted Middleton's risk of re-offending is low and he was under significant stress at the time.
Alec Burns, defending, said Middleton had had a breakdown shortly before the offending, which happened during one single conversation.
The court heard Middleton's computer equipment was seized after his arrest and nothing illegal was found.
Mr Burns said Middleton was "more than embarrassed" about his crime, adding: "He has lost his family because of this."
He said Middleton has sought help with his problems and resigned from the position he had in public service.