A tenant called a council official and hurled vile abuse at him down the phone.

Andrew Ellis screamed at the Kirklees Neighbourhood Housing worker that he was “dirty homosexual scum” causing him some considerable distress.

He was previously convicted for making nuisance calls to the NHS and has a Criminal Behaviour Order barring him from future similar behaviour.

He pleaded guilty to an offence under the Malicious Communications Act of sending an electronic communication or an indecent or grossly offensive nature for the purpose of causing anxiety or distress.

The 41-year-old had received some documentation from the victim upon his request but was unhappy about this and called him on February 13.

Ellis then contacted the KNH office and asked to speak with him directly, Kirklees Magistrates’ Court was told.

But he became verbally abusive and, despite being warned about his behaviour, continued to scream and shout and so the victim ended the call.

Kirklees Neighbourhood Housing, St. Andrews Road, Huddersfield.

Prosecutor Natalie Chapman said that 10 minutes later Ellis contacted the housing office again.

This time the victim took the phone call via the switchboard to ensure that the conversation was recorded.

Miss Chapman told the Huddersfield court: “The defendant was extremely angry, screaming down the phone and causing the victim some concern.

“Ellis said: ‘Get the f*****g police’, he was shouting and said he wanted to be arrested.

“Then he said: ‘You dirty homosexual scum’ to the victim and said this twice.

“The victim was extremely concerned and said he did not come to work to be treated in that manner.”

Ellis had a previous conviction of causing distress or anxiety via menacing phone calls he made to the NHS.

Earlier his year he was handed a community order as punishment and made the subject of Criminal Behaviour Order, aimed at preventing future similar offending.

The court was told that following the imposition of this the Probation Service had problems with him being abusive towards its staff.

His solicitor Catherine McCullough explained: “Mr Ellis does have a personality disorder which does manifest itself in an anti-social manner and alongside that he has mental health difficulties.

“When this offence took place he had a change in his medication and he thinks it happened because of the different medication he was on at the time.

“He has a CBO and the victim in this case it part of that order.”

Deputy District Judge Moran handed Ellis, of Victoria Road, Thornhill Lees, Dewsbury, a conditional discharge, meaning that he will not be punished further if he stays out of trouble for the next 12 months.

He still has to comply with the terms of his current community order and pay £85 costs plus £20 victim surcharge