Miraculously, the firearm did not discharge as the safety catch was on.
"One of the officers was able to taser the offender, causing him to drop the firearm,"
Hassan said.
"The offender then tried to get into the police car and was tasered a second time."
The man resisted arrest and allegedly punched one of the officers in the face twice.
He then tried to flee the scene.
But the other officer deployed their taser, which subdued the man.
He was eventually arrested.
A 36-year-old man will appear in Manukau District Court today on charges of unlawfully taking a motor vehicle, unlawful possession of a pistol, two charges of use of a firearm against a law enforcement officer, injuring with intent to cause grievous bodily harm, and unlawful possession of ammunition.
Further charges could follow.
One of the officers received cuts and bruising but did not require medical treatment.
Hassan said it was an "extremely distressing" incident for the staff involved.
"Our community will be horrified by this alarming incident, which could have easily had a tragic outcome for our police officers," she said.
"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.
"I want to praise the courageous actions of our staff involved, who acted quickly in a highly stressful situation to disarm the alleged offender and ensure not only their own safety, but the safety of our community."
The incident came a day after the tenth anniversary of the fatal shooting of Sergeant Don Wilkinson.
Wilkinson was fatally shot on 11 September 2008 while carrying out undercover duties in Mangere.
The offenders chased him and his partner in a car before catching them and opening fire, killing him instantly. His colleague was also shot and severely beaten.
Deputy Commissioner John Tims said the welfare of police staff was the organisation's number one priority.
"Policing can be unpredictable and that is why it is so important that whenever we have an incident of this nature, we always review the circumstances to ensure that we have the best policy and practice in place in order to support our staff in the field," he said.
"Our 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.
"However, our staff are well trained and have a number of tactical options available to them.
"We back our officers to make the appropriate decisions at the time according to the circumstances facing them."
Police Association: Officer alive due to 'luck'
Police Association president Chris Cahill was alerted to the incident first thing this morning.
He was yet to speak to the officers involved but association staff in Auckland had been on the ground offering support.
"It's just scary how it just relied totally on luck," he said.
"I just get worried that our luck's going to run out…"
Cahill described his initial response when hearing the details of the attempted shooting.
"It was 'thank God the officers are safe'," he told the Herald.
"But unfortunately it wasn't one of surprise because close calls are just so regular now.
"So many offenders are being found with firearms that it's only a matter of time until these sort of incidents occur with a more serious outcome."
The officers involved will likely take some time off to recover from their ordeal, but Cahill said the amount of time would be up to them and their supervisor.
"We are just so proud of the officers and the way they responded and reacted and the quick thinking that saved themselves," he said.
"The really unfortunate thing is, until we do something about the proliferation of firearms in the hands of criminals, similar incidents with a much worse result could happen again tomorrow."
Cahill said politicians and the wider community should take this as a wake-up call.
"It is exactly the sort of incident the association has been speaking of with respect to the proliferation of illegal firearms in our communities," he said.
He was also concerned that officers were regularly taking a taser to a gunfight.
"We know that tasers are not always effective," he said.
"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."
"Our officers do not go to work to be shot at. It should never be just part of the job."
Earlier this month a police officer who shot a man dead while on duty spoke about his experience, hoping to shine a light on what frontline cops have to deal with in relation to armed offenders.