A young man arrested for causing a drunken disturbance at a west Dublin nightclub was a "loose cannon ready to go off", a judge has said.
Dylan O'Donovan (24) resisted gardai when they arrested him during a "classic public order incident".
Judge David McHugh adjourned the case for a restorative justice report.
O'Donovan, of St Aongus Court, Tallaght, pleaded guilty to threatening, abusive and insulting behaviour, public intoxication and resisting gardai.
The incident happened at Buzz, Moran's Red Cow Hotel, last March 9.
Gda Conor Dooley told Blanchardstown District Court that security staff made an effort to remove a man from the premises, and when he dealt with O'Donovan the accused tried to evade arrest.
He had previous public order offences.
"He's going to end up sooner or later in that door there," Judge McHugh said, indicating the court's custody area.
O'Donovan had apologised for his behaviour after the incident, his barrister Jennifer Jackson said.
He had gone to the garda station with his mother and offered an apology.
It was a "classic public order incident", Ms Jackson said.
The accused had been in the club, had too much to drink and was "completely out of it".
He did not usually drink and had no explanation for what happened.
"He's a loose cannon, ready to go off. That would be my view," the judge said.
There had been a "level of immaturity at play", but the accused was now in the process of turning his life around, Ms Jackson said.
The judge remarked that it was O'Donovan's mother who was acting responsibly, and it was thanks to her that he was still "halfway on the rails".
"He should be ashamed of himself.
"He's a grown man," Judge McHugh said, adjourning the case to a date in March.