A 22-year-old man and a 17-year-old youth have pleaded guilty to charges relating to an attack in which a garda sergeant was shot last year.
Dublin Circuit Criminal Court has heard that Sergeant Mark Clarke 'thought he was going to die' as he was rushed to hospital in the back of a patrol car.
Jonathan Radford shot at Mr Clarke from a stolen car while the garda sergeant was on duty outside a house in Crumlin which had been shot at earlier on 27 September 2006.
Radford also pointed the loaded gun at pursuing gardaí and fired another shot.
Jonathan Radford and a youth, a 17-year-old who cannot be named for legal reasons, said they were on cocaine at the time of the incidents.
Both pleaded guilty to a number of charges relating to the attacks.
They will be sentenced next year.