A young man called gardai terrorists, p****s and w***ers after they directed him and a group of his friends to go home.
Sean O'Donoghue (21) had been drinking wine, which he does not usually drink, and cannot remember anything about the incident.
A court also heard O'Donoghue's parents were "not impressed" with his behaviour.
Judge Victor Blake fined O'Donoghue €450 and imposed a two-month sentence suspended for 12 months.
Judge Blake told O'Donoghue, who hopes to study physiotherapy, that he has a "bright future" ahead of him and his behaviour was "unacceptable".
The defendant, of Cedar Park, Swords, admitted before Swords District Court to public drunkenness, threatening and abusive behaviour and failing to follow directions of gardai.
Sgt Bob Kavanagh said gardai were called to an incident at Dublin Road, Swords, involving a large group of youths who were drinking from bottles of wine.
Sgt Kavanagh said they were highly intoxicated and gardai directed them to leave the area.
He said they all left, except the defendant, who was holding an open wine bottle.
The sergeant said O'Donoghue told gardai to f**k off and called them p****s and w***ers", as well as terrorists.
Defence solicitor Fiona D'Arcy said O'Donoghue had been drinking wine and does not remember the incident.
She said he is working in a fast food restaurant and hopes to study physiotherapy.
She said O'Donoghue has not had a drink since the incident and has delivered a written apology to gardai.