Grant Christie, 38, of Sandeman Street, was ordered at Dundee Sheriff Court to pay compensation to a police officer he spat on at Hogmanay.
Fiscal depute Lynn Mannion told the court the accused was at the charge bar area at police headquarters and was seen spitting on the floor.
“He was told to stop doing it by officers, but continued with it and then spat on the officer’s leg,” she said.
Christie had previously admitted committing the offence on December 31 last year at police HQ in Bell Street, where he assaulted PC Alastair Kiddie by spitting on him, striking him on the body.
When he appeared at court last month, Sheriff Tom Hughes told him his actions were “unacceptable”, adding: “I’m not having police officers being spat on while they are going about their work.”
He also warned him about the seriousness of his situation.
The sheriff ordered a social work report and a restriction of liberty order assessment and granted Christie bail.
When Christie appeared for sentence, Sheriff Hughes again told him: “The courts will not tolerate police officers being spat on in the course of their duty.
“You will pay compensation to Constable Alastair Kiddie of £400.”
He also placed him on a community payback order under supervision for one year.
He added: “This is a direct alternative to custody.”