The emergence of a gun at Endeavor Health Swedish Hospital on Saturday in a shooting that killed a Chicago police officer and left another gravely wounded exposes the potential security fail points when a detainee arrives for treatment.

The shooting was the second at an Endeavor Health hospital in the Chicago area in less than a year. Last summer, a man who had been taken to Evanston Hospital for a psychiatric evaluation reached for a gun in his backpack after he became agitated, striking a security guard trying to restrain him, according to prosecutors. Criminal charges against the man are still pending.

In last week’s incident, prosecutors accuse Alphanso Talley, 26, of using the same 10mm handgun from a dollar store robbery that morning to kill Chicago police officer John Bartholomew, 38, and wound his partner in a shattering scene in what was supposed to be a safe and protected environment at Swedish Hospital.

Like this story? Get 10 like it every morning — free Chicago newsletter. Subscribe free →

Talley was arrested after the alleged robbery and claimed he had swallowed drugs, prompting the hospital trip, prosecutors have said. Between the arrest and the shooting inside a CT scan room a few hours later, the gun surfaced. Prosecutors say Talley allegedly “reached under a blanket and pulled out a 10mm semi-automatic handgun,” causing the fatal security break in a chain that is meant to protect law enforcement, hospital staff and patients.