A West Side man charged with trying to kill three Chicago Police officers in an Independence Day shooting was ordered held without bail Friday.

Tayshawn Terry, 24, is accused of firing a single shot at a group of uniformed officers when they approached him early Wednesday in the Austin neighborhood, according to the Cook County State’s Attorney’s Office. He was subsequently charged with a count of attempted first-degree murder for each officer.

Terry was on mandatory supervised release from the Illinois Department of Corrections at the time of the shooting, prosecutors said. Although he was supposed to be wearing an electronic monitoring bracelet, he took it off between 12:30 and 4 a.m. on the day of the shooting.

The bracelet could be seen strapped around Terry’s ankle over a white sock when he appeared in court Friday wearing shorts and a T-shirt.

A spokeswoman for IDOC did not respond to a request for additional information Friday. Terry was released on parole May 24, according to the agency’s website. He was serving a 4 1/2-year sentence at the Western Illinois Correctional Center on a weapons charge.

A co-defendant, 21-year-old Lamoeta Foster of the Austin neighborhood, was charged with unlawful use of a weapon by a felon when he was found in possession of a revolver after running from the scene of the shooting, according to prosecutors.

Tyshawn Terry booking photo

Tayshawn Terry | Chicago Police

Both men are members of the Four Corner Hustlers street gang, according to police reports.

Early Wednesday, an officer monitoring a police POD camera in the area of Massasoit Avenue and Augusta Boulevard saw Terry twice remove a gun from his waistband while he stood with a group of 5-10 people in the 900 block of North Massasoit Avenue, Assistant State’s Attorney Ben Williams said Friday at the Leighton Criminal Courthouse.

Three officers approached Terry through the west alley on Massasoit Avenue, Williams said. A Chicago Police sergeant took up a position near the mouth of the alley and two other officers approached through a gangway near the home Terry was standing in front of.

When the officers called out “Police,” Terry took the gun from his waistband and fired a single shot in the direction of the three officers in the alley, Williams said. None of the officers was struck.

Lamoeta Foster | Chicago Police

Terry took off running and threw the gun, Williams said. Investigators later recovered a .40-caliber semi-automatic handgun loaded with eight rounds of 9mm ammunition. A fired cartridge was lodged in the chamber.

When the shot was fired, Foster ran south on Massasoit Avenue while holding a .38-caliber snub-nosed revolver, Williams said. One of the officers who was shot at by Terry fired five shots at Foster. The bullets did not strike him and he was taken into custody after trying to hide under a parked car, Williams said.

Prosecutors said the shooting was captured on video by the POD camera and by body cameras worn by the officers.

Terry escaped capture after the shooting, but was later identified by his parole officer through surveillance images, Williams said. He was taken into custody Thursday at a home in the Humboldt Park neighborhood that he was using for his parole address, according to an arrest report.

“The state’s proffer was shocking to say the least,” Judge John F. Lyke Jr. said in court. “This could have gone horribly bad.”

Lyke ordered Terry held without bail and Foster was ordered held in lieu of posting $10,000 bond.

Both men were scheduled to appear in court next on July 13.