A playwright who said he had the HIV virus spat in a garda's face, a court was told.
Sean Grogan (50), of Homelawn Avenue, Tall- aght, also threw a bottle at a second officer.
The defendant admitted assaulting Gda William Garbutt on February 20.
He also admitted a breach of the peace.
Tallaght District Court heard Grogan was drinking at a bonfire with a group of young men.
As officers approached, he swung a bottle at Gda James Hughes.
Grogan was arrested and taken to Tallaght Garda Station.
On the way, he spat in the face of the driver, Gda Garbutt.
The court was told the garda was worried by the incident because Grogan, who had blood in his mouth, said he had "the virus".
Stephen Montgomery, defending, said that his client had co-operated fully with the Probation Service.
Mr Montgomery said Grogan was now writing stage plays, and this had given him a "new lease of life".
Judge Patricia McNamara gave Grogan a two-month suspended prison sentence.