Police are horrified after a loaded sawn-off shotgun was aimed at two Auckland officers last night and the trigger pulled twice.
The gun did not discharge because the safety catch was on.
Police said the officers had pulled over a car in Otahuhu at about 9.35pm last night when the driver ran towards them with the firearm.
After trying to fire the gun, the man dropped it after one of the officers used a taser on him.
He then tried to get into the police car and allegedly punched one of the officers in the face, before he was tasered two more times.
Inspector Naila Hassan said the incident was extremely distressing.
"Our community will be horrified by this alarming incident, which could have easily had a tragic outcome for our police officers.
"Our brave staff come to work every day to keep the public safe and the absolute last thing they deserve is to be threatened with a firearm."
She said one of the officers received cuts and bruising but did not require medical treatment.
Deputy Commissioner Districts John Tims said staff should not have to deal with these types of situations, but "the reality of policing means our officers are put in dangerous situations every day".
NZ Police Association president Chris Cahill said it was "purely a matter of luck" that nobody was injured or killed.
"Had the alleged shooter not had the safety catch on his firearm, or if he'd had time to take off the catch before attempting to fire the second time, this frightening incident could have been so much worse."
He said he was concerned that officers were taking a taser to a gunfight.
"We know that tasers are not always effective. They are an excellent deterrent in situations where officers are confronted by offenders armed with weapons including knives, but they are no match for firearms. In this case they worked and that is a relief."
Mr Cahill said the problem was there was no registry of firearms in New Zealand so no-one knew how many firearms there were, who had them and where they were.
A 36-year-old man has been arrested and faces multiple charges, including stealing a motor vehicle, unlawful possession of a pistol, use of a firearm against law enforcement officers and injuring with intent.