A man trying to evade arrest shot a police officer before fleeing to Northern Ireland, a court heard.
Damian Devine of Allder Way, Croydon, is accused of the attempted murder of PC Wayne Stevens, who was shot in the arm on July 15 last year.
The 27-year-old is accused of firing two shots at PC Stevens who was chasing him after becoming suspicious of his behaviour at a block of flats on Kingsdown Avenue, Croydon.
Kingston Crown Court heard residents' suspicions were aroused about a group of men they thought might be attempting to burgle the block.
Neil Moore, prosecuting, said police were called by an off duty officer whose wife had seen the three males hanging around.
Mr Moore said: "The officers approached the men, two of them were stopped and arrested.
"The third however ran off. It was PC Stevens that gave chase and not very long into the pursuit the man turned around and fired a shot at him.
"He was shot in the left arm. The officer stopped but nevertheless the man shot a second shot at him which missed."
Mr Stevens, who was off work for three months after the shooting and was in hospital for a week, told the court the whole experience was surreal.
He said: "He was about ten feet away. Then there was a flash of light and a loud bang. It came from the male I was chasing. I did not see the weapon."
He said: "I abruptly stopped, my arm just went dead and it wasn’t moving properly. I stayed up initially and once I had stopped there was another flash of light and another bang.
"It was just surreal. I was not thinking a lot, I was sweating and trying to answer questions that colleagues were asking me."
Jurors were told mobile phone records placed Mr Devine around Kingsdown Road in the minutes before the shooting.
Mr Devine was arrested at his brother's house in Belfast four days later.
The court heard mobile records also showed Mr Devine travelled from Euston station to Wales, and then on to Northern Ireland on July 16, the day after the shooting.
Mr Moore said: "The prosecution say this is evidence the defendant travelled to Belfast to escape what he had done."
Jurors were also told that Mr Devine had an interest in weapons. Officers found 38 calibre cartridges when they searched his house, the court was told.
A search of the defendant’s computer found a number of diagrams showing Berettas split into parts.
Mr Moore added: "He used Google for extensive research into firearms from January to July 2011.
"Google searches included assembling beretta 1934 clip and disassembling beretta 1934 clip."
Mr Devine denies one count of attempted murder, three counts related to the possession of a firearm and two counts related to the possession of ammunition.
The trial continues.