CHICAGO (CBS) — An off-duty Cook County Sheriff’s corrections officer shot and wounded a man who was trying to carjack him along with two others in South Chicago early Thursday morning, officials said.

Around 2:30 a.m., the off-duty corrections officer was getting out of his car in the 7900 block of South Essex Avenue when three men walked up and tried to steal his car, according to the Sheriff’s office.

READ MORE: 1 Killed, 7 Wounded In Weekend Shootings In Chicago

One of the men had a gun, the Sheriff’s office said.

The corrections officer fired his own gun and struck the armed man in the groin and arm, the Sheriff’s office said. The other two would-be robbers ran off, and the suspect who was shot was taken to the University of Chicago Medical Center, where he was treated and released into Chicago Police custody.

READ MORE: Leroy Long Charged With Shooting On Dan Ryan Expressway Near 87th Street

A .38-caliber pistol was recovered at the scene, the Sheriff’s office said. It was not clear if the suspected armed robber fired it during the incident.

The robbery suspect is on parole for felony theft for stealing a television from a pawn shop, the Sheriff’s office said.

MORE NEWS: CFD Battalion Chief Hurt In Crash While Responding To Uptown Fire

Chicago Police are investigating.

CBS 2 Chicago Staff