A man threatened to break a garda's arm and had to be pepper sprayed when he became violent during an arrest, a court heard.
Jason Prenderville (29) was punching and kicking out at gardai when they had to subdue him with batons.
Judge Michael Walsh jailed him for eight months for public order offences in separate incidents.
Prenderville, of no fixed address, had pleaded not guilty to public intoxication, threatening, abusive and insulting behaviour and garda obstruction.
A garda told Dublin District Court he was walking by the Luas stop on St Stephen's Green last August 3.
His attention was drawn to Prenderville because he made eye contact with him and quickly walked in the opposite direction. He then became abusive.
"At one point, he threatened to knock me out and break my arm," the officer said.
"He cursed quite a lot, telling me to eff off."
The accused denied being threatening and abusive and said he did not threaten to break the garda's arm.
"I wasn't cursing," he said. "I don't curse."
Last February 1, a garda saw the accused on Grafton Street. He was struggling to stand and abusing members of the public.
When approached, he became aggressive and screamed at gardai.
When told he was being arrested, he put up "strong resistance" by punching and kicking out. Gardai had to use pepper spray and baton strikes to his lower leg.
Prenderville claimed he was "minding my own business", had only had two pints and all he did was draw the attention of the gardai to a group of men arguing across the road.
Judge Walsh found him guilty.