TWO gardai were forced to dive out of the way after a teenage driver reversed at high speed towards them in an apartment car park.
Ryan Donaghy (19) also rammed a set of electronic gates trying to get out of the underground car park.
Judge David McHugh imposed a six month sentence suspended for two years.
The defendant, of Dunsink Drive in Finglas, admitted before Blanchardstown District Court to endangering the lives of Garda Richard Finan and Garda Robbie Byrne.
He also admitted to driving a stolen car at Hamptonwood Apartments in Finglas on February 10 last.
Sergeant Mary Doherty said Donaghy reversed at high speed towards gardai, forcing them to dive out of the way.
He rammed a set of gates, before reversing at officers a second time, forcing them to dive for cover behind a pillar.
He then jumped from the car and tried to get through a locked gate.
Sgt Doherty said two hammers were also found in the stolen car.
Defence solicitor Simon Fleming said Donaghy, who has never been in trouble before, panicked when he saw gardai.
Mr Fleming said Donaghy was lucky no one was injured in the incident.
He said Donaghy's family has suffered a lot of tragedy. His two uncles committed suicide and this badly affected the defendant, who has also self-harmed.
Judge McHugh said Donaghy had put gardai in great danger.