A 42-year-old NYPD detective was fatally shot while responding to a robbery at a Queens cellphone store, and officials believe he was killed by shots fired by other police officers. The suspect, who police thought was armed, was apparently holding a fake handgun.

Detective Brian Simonsen (NYPD)

"This appears to be an absolutely tragic case of friendly fire," NYPD Commissioner James O'Neill said during a Tuesday night press conference at Jamaica Hospital to address the death of Detective Brian Simonsen, who, O'Neill said, spent his entire 19 years on the police force "serving the people who live and work in the 102nd Precinct."

Around 6:10 p.m., the NYPD says 911 calls came in about a robbery at a T-Mobile cellphone store at 91-62 120th Street in Richmond Hill, with one of the callers describing an armed suspect. Simonsen and his sergeant had been working on another case in the area, but responded to the scene, along with patrol units.

"Through the windows of the store, the officers did not see anyone inside. The officers then entered the store and immediately saw a man fitting the description of the suspect emerge from the back, pointing at them what appeared to be a handgun," O'Neill said.

"With the suspect advancing toward them, the officers discharged their weapons and retreated out of the store," he continued. "That was when Detective Simonsen was shot. His fellow officers put him in a marked police car and transported him here, where the trauma staff did their best to try to save him. We thank them for that. They were unable to do so, however."

A police source told the NY Post that "eight officers fired a total of 40 rounds." Simonsen was shot in the chest.

Police at the hospital (Kevin Hagen / AP / Shutterstock)

The sergeant, identified by the NY Times as Matthew Gorman, 34, was shot in the leg. He is in stable condition at Jamaica Hospital. O'Neill said, "A passerby in a civilian vehicle stopped and helped him into the car and transported him here."

O'Neill called the suspect a "27-year-old Brooklyn resident and career criminal," and noted that he was shot numerous times. The suspect, identified by multiple outlets as Christopher Ransom whose nickname is "Detective," is in stable condition at Booth Memorial Hospital in Queens.

A fake handgun was recovered at the scene, according to police.

Simonsen was married, and Mayor Bill de Blasio said, "Commissioner O’Neill and I just spent time with Detective Simonsen’s family and it was heartbreaking, absolutely heartbreaking. His mom, who has suffered so much, his wife - the shock that they’re feeling was so painful to see. And we told the Simonsen family that the New York City Police Department would be there for them, the people of New York City would be there for them. For as long as they lived, we would support them. And it was some small comfort to them in this moment of agony."

The last police officer to be killed in the line of duty was Officer Miosotis Familia, 48, who was fatally shot while sitting in a mobile command center in the Bronx in July 2017. In December, a police officer in Staten Island was injured by a fellow officer's friendly fire while responding to a domestic disturbance; the suspect was killed in the encounter.

Nearly 10 years ago, Officer Omar Edwards, was fatally shot by another officer responding to a 911 call that Edwards, who was off-duty at the time, had made before chasing a man who broke into his car.