A young man who tried to rugby tackle a garda to the ground and then bit him twice on the arm had mixed vodka, pills and cocaine.
Nathan Benson (20) kicked a second garda twice to the lower back as officers struggled to arrest him.
He was foaming at the mouth and had white powder on his nostrils at the time of the attack.
Judge Paula Murphy adjourned the case to see if Benson was suitable to attend the Drug Treatment Court.
The defendant, of Woodfield in Knocklyon, admitted before Tallaght District Court to assaulting Garda Declan Buckley and seriously assaulting Garda Christian Madsen.
Sergeant Michael Phelan said gardai got a call about a vehicle in the car park of Rathfarnham Shopping Centre around 12.15am April 22 last.
Sgt Phelan said there were no headlights on the vehicle and gardai indicated for it to stop.
As the vehicle turned onto Butterfield Avenue a white bag was thrown out the window.
The car stopped and Benson got out. Sgt Phelan said he was very aggressive and tried to rugby tackle Gda Madsen.
The garda went to arrest Benson and he bit down on Gda Madsen's right bicep.
Benson broke free, there was a struggle and he bit Gda Madsen on his right bicep a second time. The skin was bruised, but not broken, Sgt Phelan said.
The court heard that Gda Buckley went to help his colleague and he was kicked twice to the lower back.
Neither garda needed medical attention, Sgt Phelan said.
Gardai noticed Benson had white foam around his mouth and white powder at his nostrils at the time of the assault.
Defence lawyer Stephen Montgomery said Benson lived with his grandparents because of his parents drug issues.
He had taken vodka, pills and cocaine on the day of the assault. He needed help to deal with his own drug problem, Mr Montgomery said.
Sgt Phelan agreed that Benson needed help, saying he was a long-term drug user but his actions had begun to escalate.
In relation to the assaults, Mr Montgomery said Benson over-reacted as he thought gardai were a bit over zealous in handcuffing him.