The partner of a probationary Nottingham Pc who was wounded in the stomach has said he would have shot the gunman if he had been armed.
Trevon Kyron Thomas is charged with attempted murder
Trevon Kyron Thomas, 24, from Melford Road in Bilborough, denies the attempted murder of 24-year-old Pc Rachael Bown on 14 February 2006.
He also denies possessing a firearm with intent to resist arrest.
Pc Martin Foster told Nottingham Crown Court his first thought on seeing the gunman was: "Where's my gun?"
Pc Bown suffered life-threatening injuries when she was shot in the stomach below her body armour, while investigating reports of a burglary in the Lenton area.
Pc Foster, who was armed with CS gas and a baton, told the jury: "My first thought was 'Where's my gun?' Had I had one I would have shot him.
"Then my secondary thought was choosing between CS and my baton. Which to draw, which would be best."
The officer, who has served on Nottinghamshire Police for 17 years, said he and Pc Bown were standing a short distance apart when the gunman opened fire as he ran between them.
"To protect myself and Pc Bown I used my CS incapacity spray.
I may have hit him slightly, but not a direct hit to the face. It didn't appear to have any effect, he turned his head away from it.
"He was approximately 7ft (2.1m) away, between myself and Pc Bown. I heard three bangs, I can't say which one hit her."
The officer said they both moved to let the man - who was running with a gun - past them but he fired anyway.
He then told the court he frantically tried to help Pc Bown by laying her on the ground and helping her remove her vest and shirt.
"Almost immediately she started screaming.
"Pc Bown brought her hand out of her waistband and there was blood on her hand.
"I found what I believed to be a bullet wound to her lower left abdomen. I stood there in disbelief at what had happened," he added.
The trial continues.