It was an apparent incident of friendly fire, Police Commissioner James P. O'Neill said. As the two officers went into the store, a suspect came out of a back room with a replica handgun. The detective and sergeant fired, and as they were leaving the store, the detective was apparently shot by uniformed officers.
"Once again our hearts are broken in the NYPD," O'Neill said.
Brian Simonsen, 42, and a 19-year veteran of the department, was killed, police said.
O'Neill and Mayor Bill de Blasio met with Simonsen's family at a hospital.
"It was heartbreaking to see," de Blasio said. "The shock that they are feeling was so painful to see."
"Make no mistake about it, friendly fire aside, it's because of the actions of the suspect that Detective Simonsen is dead," O'Neill added.
The suspect, described by O'Neill as a 27-year-old career criminal, was shot multiple times and is listed as stable, O'Neill said.
O'Neill said a sergeant, who has been on the force for eight and a half years, was also wounded and is in stable condition.
Audio recorded from police radio during the incident suggests a chaotic scene. In a span of about 20 seconds, numerous gunshots can be heard as several officers call in and yell "Shots fired!"
The injured sergeant eventually radios in, "Be advised, I'm shot," before relaying his location.
Before Tuesday, eight US police officers had been killed by firearms while on duty in 2019, according to the National Law Enforcement Officers Memorial Fund website.
Copyright 2019 CNN. All rights reserved.