A woman accused of attacking four Chicago police officers has been released from custody after a new state law went into effect abolishing cash bail. 

Esmeralda Aguilar, 24, a resident of the Chicago suburb of Cicero, is charged with four counts of aggravated battery to a peace officer over the incident that allegedly occurred over the weekend. 

Aguilar was arrested moments after the alleged attack in the downtown area. However, she was released Monday, the same day the Pretrial Fairness Act, which is part of the SAFE-T Act, went into effect. 

ILLINOIS SHERIFFS BRACE FOR FALLOUT OF ‘AMERICA’S MOST DANGEROUS LAW' AFTER STATE SUPREME COURT ENDS CASH BAIL

Esmeralda Aguilar mugshot inside a jail upon her arrest for allegedly attacking Chicago police officers.

Esmeralda Aguilar, 24, is charged with four felony counts of aggravated battery to a peace officer but released thanks to a new state law abolishing cash bail.   (Chicago Police Department)

"Reports that on the very first day of no cash bail, a violent offender arrested for attacking four Chicago Police Officers, sending two of them to the hospital, was immediately released because the Cook County State's Attorney's Office didn't even bother to file a motion to seek detaining the accused are problematic,"  Illinois state Sen. John Curran, said in a statement to FOX Chicago

"This highlights the misplaced priorities of Illinois' criminal justice system when the prosecutor prioritizes the freedom of a violent offender over the safety of those police officers dedicated to protecting and serving our communities," Curran added. 

The Cook County State's Attorney's office told Fox News Digital it could not comment on Aguilar's case. Fox News Digital also reached out to the Chicago Grand Lodge of the Fraternal Order of Police.

ILLINOIS MAN, TEENAGER FACE FELONY CHARGES FOR ALLEGEDLY ATTACKING CHICAGO POLICE OFFICERS WITH WOODEN FLAGPOLES

Cook County State's Attorney Kim Foxx speaks during a press conference

Cook County State's Attorney Kim Foxx (Antonio Perez/Chicago Tribune/File)

CLICK TO GET THE FOX NEWS APP

Under the new law, a judge can hold someone in jail if they are believed to pose a risk to the community. If they don't pose a danger or flight risk, they are released without having to post cash bail. 

Supporters of the law contend cash bail punishes low-income defendants simply for being too poor to get out of jail. Critics said the new law could result in the release of dangerous criminals back onto the streets as cities like Chicago continue to experience violent crime.  

"I can assure you that the Cook County State's Attorney office stands ready to implement the Pre-Trial Fairness Act." Cook County State's Attorney Kim Foxx posted to social media Monday. "This effort to detain those who pose a real threat to our public rather than detain those who are simply poor is the right thing to do."

In a statement, Cook County Board President Toni Preckwinkle called the end of cash bail a "milestone on the path toward economic and racial justice in Cook County and Illinois."

Aguilar's next court date is scheduled for Sept. 25.