This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

RICHMOND HILL, Queens — A 19-year veteran detective was fatally shot and a sergeant was injured in Queens on Tuesday night in “what appears to be an absolute tragic case of friendly fire,” NYPD Commissioner James O’Neill said.

The shooting near Atlantic Avenue and 121st Street in Richmond Hill happened around 6:15 p.m. during an apparent armed robbery, O’Neill said. The doors of the T-Mobile store were blown out by the gunfire and glass fragments littered the sidewalk.

Detective Brian Simonsen, 42

“Our hearts are broken,” O’Neill said.

Detective Brian Simonsen, 42, and a sergeant were in the area when a call came over for a robbery. People had called 911 and reported that an armed man forced employees to the back of the store. Simonsen and the sergeant arrived at the scene at the same time as patrol units.

The officers didn’t see anyone inside through the windows, but spotted a man the moment they went inside, police said. The 27-year-old suspect, who police sources identified as Christopher Ransom – a career criminal – pointed what appeared to be a gun at them.

Officers opened fire, hitting the suspect multiple times, officials said. The detective and sergeant were both shot.

“Make no mistake about it, friendly fire aside, it is because of the actions of the suspect that Detective Simonsen is dead,” O’Neill said.

Gunfire can be heard on emergency radio transmissions.

Officers recovered an imitation firearm at the scene.

Ransom has at least eight prior arrests dating back to 2010, according to police.

Last month, police released video surveillance of a man wanted for armed robberies. According to several published reports, the suspect in Tuesday’s incident is the same suspect wanted in the previous robberies.

The wounded detective and sergeant were rushed to Jamaica Hospital.

Mayor Bill de Blasio and O’Neill met with the sergeant at the hospital. The sergeant, who’s been with the NYPD for just under nine years, was shot once.

“His bravery was so clear, but his pain to have lost his colleague was so clear as well,” de Blasio said.

Simonsen’s wife and mother were also at the hospital.

“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,” de Blasio said.

Simonsen was shot in the chest, sources said. The officer had planned to retire soon.

“Brian was a good man. He was a good detective.” Mike Palladino, head of the Detectives’ Endowment Association said.

Simonsen was the elected delegate of  his precinct squad, Palladino said. The delegates met Tuesday morning, and Palladino saw him there. Simonsen didn’t have to be at work when he was shot.

“He was actually excused from duty, but we had this pattern going and he felt compelled to go to the delegates meeting, ignore the excusal, and go to work,” Palladino said.

This is the second time a police officer has been shot in the city in the past three months.

In December, a police officer on Staten Island was also hit by friendly fire as officers responding to a domestic dispute call shot and killed a man carrying a knife.

The Associated Press contributed to this story.