Mr Justice Laws had to adjourn the hearing at the Old Bailey until PC Alexander Kelly - who still has a bullet lodged in his body - managed to regain his composure.
PC Kelly, 33, had been outlining how he and a special constable, Glenn Goodman, had been checking on two men they had stopped in a red Sierra on the A64 between York and Leeds last June.
In his car and on the radio to police headquarters in Selby, PC Kelly noticed the passenger of the car get out and walk to the side of the road, near where Mr Goodman was standing.
'He was sort of adjusting his clothing and I thought he was going to urinate at the side of the road. Then he turned . . .' PC Kelly said. 'He was standing holding a gun in what I can only describe as a combat position, with both hands.'
He continued: 'He was facing to my right. He was pointing the gun straight at Special Constable Goodman. I did not hear anything but I saw two flashes from the barrel of the gun and I presumed he had shot Mr Goodman twice.
'He turned to me and I saw two holes appear in the windscreen in front of me and I felt pain in my chest. I either slumped or fell across to the passenger side.
'I looked up - I do not know why - to see the passenger pointing the gun at me again. He shot me again in the right-hand side of my body. At that time I did not know how many shots - there seemed to be a lot.'
At one stage PC Kelly said he saw fragments of plastic fly in front of his eyes, as a bullet struck the radio handset held to his ear. The jury had heard his life was 'almost certainly saved' by the fact that the bullet lodged in the handset.
PC Kelly, who said he remained conscious throughout, could not see what had happened to his colleague. He waited for things to go quiet and the gunman to drive off before raising the alarm. He had trouble breathing and loosened his collar and tried to lie flat in the car until an ambulance arrived.
A recording of his radioed cries for help - heard by officers in the control room at Selby - was later played to the jury.
A policewoman arriving on the scene was heard calling control: 'Get me an ambulance quickly. I have got one in the carriageway and one in the vehicle.'
PC Kelly spent three weeks in hospital during which he underwent operations to have bullets removed from his chest, arm and buttocks.
While recuperating he was shown videos of suspects. He told the jury it was then that he identified his attacker as Paul Magee. Looking across the court to Mr Magee, sitting in the dock, he said: 'He shot Special Constable Goodman and myself.
'The expression on his face was committed to my memory when he looked through the driver's window and shot me again.'
Mr Magee, 42, and Michael O'Brien, 28, plead not guilty to the murder of Mr Goodman and the attempted murder of PC Kelly and two other officers, constables Mark Whitehouse and Susan Larkin, who later gave chase.
PC Kelly's identification of Mr Magee as the gunman was not challenged by Mr Magee's lawyers. The court was told they had been instructed by their client not to put any questions to the police officer.
The trial continues today.Reuse content