While responding to an attempted robbery in New York Tuesday night that led to the friendly fire death of a police detective and an injured sergeant, seven officers fired off a total of 42 rounds, officials said.

Details about the violent scene in Queens came during a news conference held Wednesday by NYPD Chief of Department Terence Monahan and Force Investigation Division Chief Kevin Maloney.

Det. Brian Simonsen, a 19-year veteran of the NYPD’s 102nd precinct who was fatally shot in the chest, and Sgt. Matthew Gorman, who was shot in the leg, are believed to have been among those who fired weapons, the officials said.

The situation unfolded when Simonsen and Gorman, dressed in plain clothes, were working another case nearby when a 911 call came in around 6:09 p.m., Maloney said.

NYPD DETECTIVE KILLED IN FRIENDLY FIRE, SECOND OFFICER INJURED IN QUEENS

A witness reported seeing an individual, who wore a mask and was armed with a firearm, enter a T-Mobile location and take two employees to an office at the back of the store, he continued.

The pair arrived at the scene at about the same time as several patrol officers, following which Gorman and two uniformed officers entered the building while Simonsen remained outside, Maloney said.

“As they enter, the perpetrator comes from the back of the location, that office, and he presents himself with the firearm pointed in the direction of the officers,” Maloney explained. “At that time, the officers exit the location as the perpetrator continues running in their direction. When the perpetrator gets to the front of that store, shots are fired. We have a total of seven members of the service who discharged a total of 42 rounds during this incident.”

The suspect's firearm recovered at the scene was fake, NYPD Commissioner James O'Neill said during a previous news conference.

All of the shooting occurred outside the location and the two officers who were struck were brought to Jamaica Hospital, following which Simonsen died, officials said.

FLORIDA WOMAN’S JAILHOUSE LETTERS LEADS TO HER ARREST FOR 1986 KILLING OF MISSING SON, 3, POLICE SAY

The suspect, identified as Christopher Ransom, was also shot during the encounter and hospitalized, officials said. He is under arrest and being processed, Maloney said.

Five officers captured parts of the scene on body cameras and investigators are also reviewing surveillance footage from the store, he added. None of the videos have been made public.

"You have to understand, this happens in seconds," Monahan said. "It goes from 0 to 60. You're investigating a possible crime and all of a sudden someone is charging at you, pointing what you believe to be a firearm, simulating firing at you. It raises everything very quickly."

The fallen officer, who officials said was married and had no children, was described as someone who “was the definition of a cop’s cop.”

“Everyone in that precinct knew Brian, knew him well,” Monahan said. “He was the one that you called, he was the one that you reached out to if you had a problem in that command. It wasn’t just the cops that knew Brian well, it was the community.”

CLICK HERE TO GET THE FOX NEWS APP

The chief visited with Gorman at the hospital earlier Wednesday and said the sergeant isn’t “the least bit concerned about his own injury.”

“He’s overcome by the emotion of losing his friend and his partner, Brian Simonsen, as are all the officers in the 102 precinct that I visited today,” Monahan said. “As a department, we will never forget Brian and his sacrifice. His legacy is one of unflinching service and now the ultimate sacrifice. And he lives on in the tremendous work of all our New York finest.”

Fox News' Stephen Sorace and The Associated Press contributed to this report.