A teenager covered in blood shouted "f**king rats" at his family and then warned arresting gardai not to come near him because he had the AIDS virus, a court heard.
Shane McKeever (19) was drunk and standing in the middle of a busy road shouting abuse at passersby.
Gardai said McKeever rolled down the window of the patrol car after he was arrested and continued to roar abuse at his family.
A judge ordered a probation report and adjourned sentencing to a date next March.
McKeever, with an address at Leo Fitzgerald House, Dublin 2, admitted before Blanchardstown District Court to public drunkenness as well as threatening and abusive behaviour.
The incident took place in Ranelagh village on June 23 last.
Detective Garda John O'Donnell said he was called to Ranelagh Road shortly before 11pm following reports that a drunken man was standing in the middle of the road and obstructing traffic.
Garda O'Donnell said McKeever was shouting at passersby, and roaring at members of his family that they were "f**king rats".
The garda said the defendant was in the way of traffic, so he led him over to the footpath.
He was covered in blood and told the garda not to come near him because he had the AIDS virus.
McKeever also admitted to threatening and abusive behaviour at Ranelagh Garda Station on July 31. Garda Mark Cribbin said McKeever and a gang of youths came into the foyer, and he began to threatened other members of the public who were in the station.
Judge Brian Sheridan said gardai painted a sad picture of the defendant.
Defence solicitor Richard Young said McKeever is a young man who is struggling with alcohol and his offending is related to his drinking.
The court heard that McKeever was working with the probation services, and hoped they could help him with his difficulties.
Judge Sheridan adjourned sentencing to a date in March to allow the defendant to work with the probation services.