A police officer has described the "wash of relief" he felt each time a gun went off and he realised he hadn't been shot.
But he also felt fear after each of the five gunshots, wondering if his fellow officer had been hit.
The High Court at Whanganui heard about the incident from the officer's victim impact statement, mentioned at the sentencing for a man who helped the gunman avoid police.
Carlos Bushell, 29, appeared in court yesterday today , where he was sentenced to community work and supervision by Justice Rebecca Ellis for being an accessory after the fact to using a firearm against a law enforcement officer.
Justice Ellis said the incident began at 2.15am on August 19, when police tried to pull over Whanganui man Dolphy Kohu.
Mr Kohu lead two police officers on a car chase towards Raetihi, "driving in a highly dangerous manner".
The car chase ended when one of the policemen used his patrol car to push Mr Kohu's car off the road and into a wire fence.
The positioning of the car against the fence made it difficult for Mr Kohu to get out of the driver's side. As he was still in the car, the first officer approached him with a taser.
Mr Kohu pulled out a sawn-off, semi-automatic .22 rifle and "fired directly" at the officer.
Both police ran for cover as Mr Kohu climbed out the car window and continued firing at them.
Justice Ellis said he fired five shots in total. The officers fled to a nearby house and Kohu, along with co-offender Hereina Paul, stole the police car and left the scene.
However the vehicle got stuck, and the pair called a friend to collect them.
They then went to Bushell's house in Tangiwai.
At 9.14pm, armed offenders squad members were conducting car stops to check for the missing pair, and an officer noticed movement under a blanket in Bushell's car.
Paul was found in the back seat while Mr Kohu was discovered lying across the rear footwell with a gun believed to be the one used against the policemen.
The gun was "loaded with live rounds of ammunition", Justice Ellis said.
Bushell told police driving Mr Kohu made him feel "pretty bloody anxious" but said "I just wanted to get rid of him and get back to my family and work".
Mr Kohu died in Whanganui Prison last year, and charges against him were withdrawn.
Paul pleaded guilty to being an accessory after the fact to attempted murder, as well as helping Mr Kohu avoid arrest and unlawfully taking a motor vehicle. She is yet to be sentenced.
"You probably felt like you didn't have much in the way of options that day, you nonetheless did choose to do what you did," Justice Ellis told Bushell.
She sentenced him to 250 hours of community work and nine months of supervision. She also ordered the destruction of the gun and ammunition.