The man fatally shot by police in Papatoetoe had been deported from Australia.
Police have identified the man as Tangaru-Noere Turia, 34.
Turia had been deported from Australia as a '501' deportee in 2017. The law allows for people convicted or suspected of crimes to be kicked out of the country.
Police earlier said Turia fired at a neighbour's window before a stand-off.
He was currently facing active criminal charges but police will not divulge what these were.
The armed offenders squad and the Eagle helicopter responded and cordons were activated in the South Auckland neighbourhood.
Police said negotiations failed to resolve the situation and Turia emerged unexpectedly from his Avis Ave house armed with a gun before he was shot.
It's the second fatal police shooting in the suburb since Hitesh Lal died last April after brandishing a machete, attacking houses and threatening local residents.
A long strip of Avis Ave was cordoned off about noon on Friday.
Police guarded the avenue's intersection with Allenby Rd and only allowed residents through.
"Usually it's a nice safe neighbourhood so it's a shock for us," a resident near the intersection said.
"I've never seen anything like it. The street was full of cop cars. I'm wondering what happened. New Zealand never used to be like this."
A different resident said he heard two or three shots about 8.30pm and the ambulance went into Avis Ave straight away.
"It was scary because it was getting dark. As soon as the shots happened, the helicopter came in really close and was flying low around the house."
It still wasn't established why Turia shot at a neighbour's house on Thursday evening.
Superintendent Jill Rogers, Counties Manukau District Commander, said police would have tried non-lethal force if possible, and police dogs were at the scene.
But she said Turia emerged about 8.24pm with a shotgun and was repeatedly asked to drop the firearm but refused to do so.
Rogers said the man's family and police staff involved in the incident were being well supported.
"Serious incidents such as this are really upsetting for all involved."
She said the use of lethal force was a "worst-case scenario" for police.
But she said police opened fire to ensure not only their safety, but that of the wider community.
"We now also have a family who have lost a loved one and so we will do what we can to ensure they are well supported along with Victim Support," Rogers added.
A critical incident investigation into the shooting was under way and the Independent Police Conduct Authority was notified.
Otara-Papatoetoe Local Board chair Lotu Fuli told Newstalk ZB the shooting was the last thing the community needed right now, especially with the latest Covid-19 outbreak.
"It's very scary, but unfortunately these things have been happening more frequently over the past couple of years."