A knife-wielding man stabbed a police officer and rushed towards another in the seconds before he was shot dead by their colleague, according to one of NSW's most senior officers.
Emergency services were called to a residential street in Middleton Grange, southwest of Sydney's CBD, about 11pm on Saturday following reports of a man armed with a knife.
Assistant Commissioner Brett McFadden said a man rushed towards a police vehicle and stabbed the driver through an open window.
He said four other police then got out of the car and one unsuccessfully fired a taser.
"The male then rushed towards the officer that had discharged the taser and at this time was in close proximity to the police officer," Mr McFadden told reporters at Liverpool Police Station on Sunday.
"Another officer has then fired two shots in the torso of the 34-year-old male."
He said police and paramedics tried to resuscitate the man but he was declared dead at 11.41pm.
The Homicide Squad, regional investigators, Professional Standards Command and the Law Enforcement Conduct Commission will probe what happened.
Body-worn camera footage shows the incident unfolded within seconds and even though the officer behind the wheel of the car was not hurt he was close to serious injury, Mr McFadden said.
"The damage to his operational vest was around the right shoulder, right collarbone area, and we're talking centimetres to hitting another part of his body and causing catastrophic injuries," he said.
The 34-year-old man lived close to where the shooting took place and homicide detectives have been in touch with his family, Mr McFadden said.
Five police involved in the incident have not yet been interviewed.