CHICAGO (CBS) — A man was in critical condition and in police custody Thursday night, after Calumet City police said he got into a shootout with officers following a traffic stop.

An officer pulled over the 27-year-old man around 4:50 p.m. near the Ginger Ridge Apartments in the 500 block of Jeffrey Avenue for a traffic violation.

READ MORE: 'I Just Wanted To See My Grandma': Suburban Chicago Teens Help Peers Get COVID Vaccine Appointments

Police said the driver immediately got out of his car and pointed a gun at the officer, leading to a shootout.

The man was shot in the stomach, then ran back to his car and sped off.

READ MORE: Chicago Weather: Dry And Quiet Pattern

Officers found him across the state line at a hospital in East Chicago, Indiana, and they arrested him there.

Charges were pending Friday morning.

MORE NEWS: Man Lost Everything As He Waited On Callback From Illinois Department Of Employment Security That Never Came

The Illinois State Police Public Integrity Task Force is investigating.

CBS 2 Chicago Staff