A car salesman who was arrested outside his home after he called a garda "baldy" claimed the officer had made a comment about his mother.
Brad White (21) admitted verbally abusing the garda, but his defence maintained he said what he said "in the heat of the moment".
He was convicted of a public order offence and fined €250 when he appeared before Dublin District Court.
White, of Burg An Ri Terrace, Lucan, pleaded guilty to using threatening, abusive and insulting words or behaviour with intent to provoke a breach of the peace.
Gda Sgt Geraldine McManigan said the officer in question encountered White outside his home on August 9.
The defendant became very aggressive, called the garda a "baldy b*****ks" and told him "get the f**k away from my house", Sgt McManigan told the court.
White was arrested at the scene and taken to Ronanstown Garda Station.
While in the station he "squared up" to an officer and said "Get your f**king hands off me or I'll sort you out", the sergeant added.
White's only previous conviction was for a road traffic off-ence.
He did not deny that he had said what was claimed, but it was in "the heat of the moment," his lawyer told Judge John Cheatle.
White maintained the garda in question "made comments about my mother", the lawyer said.
Judge Cheatle asked the lawyer to confirm if this was what White was saying.
"Yes," she replied.
She asked the judge to be as lenient as he could in the circumstances.
Taking account of White's guilty plea, Judge Cheatle fined the accused and gave him five months to come up with the money.
He also granted free legal aid after an application was made on White's behalf and the court heard he was working buying and selling cars but earning €350 a week.
Sgt McManigan said there was no garda objection to legal aid being granted if a statement of the defendant's financial means was filed with the court.
He was not required to address the court during the brief hearing.