A man who sources say sold an assault rifle to gang members — which was then used to shoot two Chicago Police officers last May — was released from federal custody on a $4,500 bond on Wednesday.

Charles Williams was arrested and charged in federal court last week with possession of a firearm by a felon. On Wednesday, Magistrate Judge Young B. Kim ordered him released on $4,500, court records show.

A law enforcement source told the Chicago Sun-Times that Williams is believed to be the man who sold a high-caliber assault rifle to members of the La Raza gang. The gun was used in a May shooting that wounded two Chicago Police officers at 43rd and Ashland.

Charles Williams | Chicago Police photo

In Williams’ indictment, the Bureau of Alcohol, Tobacco, Firearms and Explosives detailed how he allegedly sold another gun to a criminal informant in a parking garage in west suburban La Grange. Though the source said he is suspected of selling the assault rifle to the La Raza gang, he was never charged in connection to the shooting of the two officers.

“Assault weapons have no place in our neighborhoods, and they certainly have no place in the hands of convicted felons,” Chicago Police Supt. Eddie Johnson said in an emailed statement Thursday. “If we are going to reduce gun violence, we all have to hold criminals accountable for breaking laws, because our police officers simply can’t do it alone.”

Angel Gomez, 18, was charged with two counts of attempted murder and aggravated battery with a firearm in the shooting. He remains held without bail in the Cook County Jail. Officials said he was the getaway driver, though no one else has been charged in the shooting as of Thursday, records show.

Sources previously told the Sun-Times that the suspected shooter — another teen — has likely fled to Mexico, where he has family. The CPD is currently working with the U.S. Marshals to locate him.

Federal court records show that federal prosecutors argued that Williams should remain in custody through his trial, though Kim denied their motion.

“For the reasons stated in open court, the government’s oral motion for pretrial detention is denied,” Kim wrote, without elaborating.

A tactical police van was shot at in the Back of the Yards neighborhood on May 2. Two officers were injured.| Photo provided by Chicago Police

Williams’ release from federal custody came less than a week after 20 additional agents from the ATF were assigned to Chicago to help quell the city’s intractable gun violence.

The Sun-Times previously reported that the ATF agents are working with about 20 counterparts from the Chicago Police Department and Illinois State Police on a strike force whose mission is to solve shootings and hunt down gun traffickers through ballistics technology.

Prosecutors from the U.S. attorney’s office and Cook County state’s attorney’s office have been assigned to the force to decide whether suspects in gun crimes should be charged in state or federal court.

“The goal is to prosecute as many of these guys as possible federally where they will serve longer prison terms,” Anthony Riccio, head of the Chicago Police Department’s organized crime unit, said last week.

A week earlier, Gov. Bruce Rauner signed legislation, championed by Chicago Police Supt. Eddie Johnson, that aimed to stiffen penalties for repeat gun offenders.

The bill urges judges to impose sentences at the higher end of the range for unlawful use of a weapon by a felon and aggravated unlawful use of a weapon. It also creates a diversion program for first-time weapon offenders, expands probation eligibility for first-time drug offenders and gives the Department of Corrections more discretion in awarding sentencing credit.

While the bill urges more time for repeat gun offenders, it also eases sentences for other crimes as part of Rauner’s effort to reduce the state’s prison population.

Assault-style rifles have been used more commonly in Chicago shootings in the last year, with the Back of the Yards neighborhood seeing an especially high frequency.