A Chicago alderman says the state's no-cash bail law has been "utterly manipulated and abused," and is calling for changes after a felon on pretrial release allegedly killed a police officer inside a hospital.

Alphanso Talley, 27, was charged on Monday after allegedly killing 38-year-old Chicago Police Department officer John Bartholomew at Swedish Hospital on Saturday, and injuring another officer in a shooting.

Talley allegedly shot both officers around 11 a.m. at the hospital, where officials said he was taken into custody for a previous armed robbery. While he was being taken to a CT scan, prosecutors said he had a gun underneath his blanket, which he pulled out and then shot both officers.

He was wanted after allegedly robbing a Family Dollar store on Saturday morning and pistol-whipping one of their female employees, taking her wallet and keys.

When Talley was accused of murdering Bartholomew and shooting another officer, he was out of jail on pretrial release for a previous armed robbery case.

A warrant for his arrest was issued on March 11 while he was on pretrial release for the alleged armed robbery after he had two electronic monitor violations in early March, according to court documents.

Judge John Lyke has presided over Talley's criminal cases for at least three years, according to no-cash bail law needs to be changed, and how the system failed Bartholomew.

"Here's a guy who's accused of a violent crime and armed robbery and he's allowed back out on the streets and then he cuts off his electronic monitoring device. And that is a deliberate act that calls for revocation of the bond," Roy said.

Talley was charged with murder, attempted murder, aggravated unlawful restraint, armed robbery, aggravated discharge of a firearm, possession of a firearm by a felon, aggravated battery of a peace officer, aggravated battery, escape and unlawful use of a weapon.

Fox News' Patrick McGovern contributed to this report.