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.

QUEENS — Authorities released a photo of the imitation gun they say was used in an apparent armed robbery that led to the friendly-fire death of an NYPD detective.

Christopher Ransom has tangled with police in the past few years, including a dramatic takedown posted on his YouTube page.

Ransom, a 27-year-old career criminal, had a fake gun during the friendly-fire death of an NYPD detective Tuesday, but he was charged with murder and manslaughter, according to police.

He allegedly forced T-Mobile employees to the back of the store when Detective Brian Simonsen responded to the scene.

He and other officers spotted a man pointing what appeared to be a gun at them. The officers opened fire, shooting 42 times, police said.

Simonson, a veteran detective, was struck in the chest and died at the hospital.

A sergeant was also shot in the leg and was taken to the hospital.

“This appears to be an absolutely tragic case of friendly fire” NYPD Commissioner James O’Neill said after the shooting. “Make no mistake about it, friendly fire aside, it is because of the actions of the suspect that Detective Simonsen is dead.”

In addition to murder and manslaughter charges, Ransom also faces charges of robbery, assault and menacing.

Ransom has been arrested at least 11 times since 2012, records show. He was also wanted in connection with a Jan. 19 robbery at another cellphone store.