NEW YORK (AP) — New York City police say a detective was killed by friendly fire while responding to a report of an armed robbery.

Police say Det. Brian Simonsen was shot at a T-Mobile store in the Richmond Hill section of Queens at about 6 p.m. Tuesday. The 42-year-old detective was a 19-year veteran.

Another officer, a sergeant, was shot in the leg and is in stable condition.

Police say a suspect was shot multiple times and is listed in stable condition.

Police say an imitation firearm was recovered.

Police swarmed to the store around 6:10 p.m. after a 911 caller standing outside reported seeing the suspect take two employees to a back room at gunpoint, according to dramatic dispatch audio. That was followed minutes later by a barrage of shots.

“Shots fired! Shots fired!” an officer is heard yelling. About a minute later, the sergeant tells dispatchers that he’s been hit and an officer screams for dispatchers to rush an ambulance to the scene for the mortally wounded detective.

Mayor Bill de Blasio and police officials are expected to speak to reporters at the hospital Tuesday night.

Arwindern Singh, who lives across the street from the store, said he heard about 20 shots go off and thought they were firecrackers.

When he went outside, he said “all of a sudden there were cops all over.”

The shooting started about two minutes after the officers were directed to go to the store, according to dramatic dispatch audio. A 911 caller outside the store reported seeing the suspect — dressed in all black and carrying a duffel bag — take two employees to a back room at gunpoint, according to the recording.

“No sirens, guys,” the dispatcher warns.

The gunfire blew out the store’s doors, showering the sidewalk with glass. Scores of police officers streamed to the scene, which was roped off with crime tape. Some walked together in a line, searching for evidence.

Senate Democratic Leader Chuck Schumer tweeted condolences.

“We are forever indebted to the brave NYPD detective who was killed in Queens tonight and the sergeant who was wounded,” Schumer wrote. “May God bless them and their families.”

New York Attorney General Letitia James said it was “a painful night for all of New York City.”

“Every day our men and women in uniform risk their lives to protect us, and tonight we are truly heartbroken to lose one of our own,” James, a Democrat, said in a tweet.

The last New York City police officer killed in the line of duty was a 12-year veteran and mother of three who was gunned down in 2017 while sitting in a police vehicle.

Officer Miosotis Familia, 48, was writing in her notebook when ex-convict Alexander Bonds strode up and shot her through a window. Bonds, who had railed about police and prison officers in a Facebook video months earlier, was fatally shot by officers soon after the attack.

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

WHAT OTHERS ARE CLICKING ON:

>>MORE STORIES