NEW YORK (CBSNewYork) – Two men charged with murder in the death of NYPD Det. Brian Simonsen pleaded not guilty Monday.

The 42-year-old was shot and killed in what the department called a tragic case of friendly fire while responding to a robbery last month at a T-Mobile store in Richmond Hill, Queens.

“This was a tragic incident that should have never happened. The two defendants were allegedly on a robbery-spree – hitting cell phone stores – but this time the heist went awry and two veteran police officers were shot. One defendant allegedly served as a look-out and the other is accused of holding up the store workers with a fake handgun,” Queens Chief Assistant District Attorney John M. Ryan said in a statement, on behalf of DA Richard Brown . “The police, doing what they do every day without hesitation, responded to the scene. One of the defendants allegedly ran at and pointed his fake gun at the police and the responding officers fired. Detective Brian Simonsen was killed and Sergeant Matthew Gorman was seriously injured.”

MORE: ‘New York City Is Heartbroken’: Fallen NYPD Det. Brian Simonsen Mourned At Funeral

Police said the suspect, 27-year-old Christopher Ransom, pointed a fake gun at Simonsen and other responding officers, sparking a shootout.

The 19-year veteran was fatally struck in the chest. His partner was also wounded.

Ransom, who had more than 20 prior arrests, was charged with murder, aggravated manslaughter, assault, robbery and criminal possession of a weapon.

MORE: NYPD, Feds Working Together In Attempt To Stop Rash Of Cellphone Store Robberies

Police later said 25-year-old Jagger Freeman acted as a lookout for Ransom. He was also charged with murder, assault, robbery and criminal possession of a weapon.

Both men pleaded not guilty Monday.

Ransom and Freeman have also been indicted for allegedly holding up the same T-Mobile store on Feb. 12 and hitting another location on Feb. 8. Additionally, Ransom faces charges for allegedly robbing other cellphone stores on October 23, 28 and Jan. 19.