Anyone with suspected coronavirus caught spitting at police would be dealt with at the crown court, a Swindon judge warned.

Judge Peter Crabtree, sitting as a district judge at the magistrates’ court on Tuesday, said: “If you cough at an officer in a confined environment and indicate to an officer you might have coronavirus either directly or indirectly that’s exceptionally serious in my view.”

He added: “Anyone who’s spitting will go to the crown court.”

It came as a Wiltshire man appeared before Swindon Magistrates’ Court charged with coughing at a constable in Tidworth on Monday afternoon.

Appearing via video link from Melksham police station wearing a face mask and flanked by two custody officers in plastic overalls, Kieran Mander, 22, of Vockins Close, Tidworth, pleaded not guilty to assault and disorderly behaviour. He was bailed for a trial later in the year.

The so-called coronavirus cough has caused concern among politicians, prosecutors and police chiefs in recent weeks as the pandemic continues to claim lives.

Director of public prosecutions Max Hill QC, the man responsible for the Crown Prosecution Service, said last month that anyone caught coughing over cops would be charged with assault.

“Let me be very clear: this is a crime and needs to stop," he said. "The CPS stands behind emergency and essential workers and will not hesitate to prosecute anybody who threatens them as they go about their vital duties."

On Monday, Warminster man Peter Cooper, 36, was sentenced to 13 weeks imprisonment after he admitted spitting from his police station cell into the eyes of a custody sergeant.

Following the sentence, Chief Constable Kier Pritchard said: “This behaviour is absolutely disgusting at any time, but given the current situation when everyone’s anxieties are heightened, it is despicable.

“His actions have left the detention officer feeling shocked, angry, extremely upset and anxious about their own health, and the health of their family.

“He has now been left with no other option but to self-isolate due to concerns Cooper may have had coronavirus.”

Police and Crime Commissioner Angus Macpherson added: “I am extremely saddened to hear news of this incident while this member of the force was simply carrying out his duties.

“I am pleased the court has seen fit to issue Cooper with a custodial sentence – this was a deliberate attack with the intention of causing distress and upset to the detention officer and this behaviour is unacceptable.”