CHICAGO (STMW) — A man charged with shooting an off-duty correctional officer during a carjacking attempt early Sunday in the South Side Gresham neighborhood was arrested when he showed up at the same hospital as the officer with a gunshot wound of his own.

James Tillman, 21, of the Near West Side, is charged with attempted first-degree murder, aggravated battery with discharge of a firearm, and attempted aggravated vehicular hijacking, according to Chicago Police.

READ MORE: Chicago Mass Vaccination Sites To Begin Offering Pfizer Vaccine For Youths Age 12 To 15 On Thursday

On Monday, Judge Maria Kuriakos Cecil ordered him held without bond, according to court records.

Tillman tried to rob a 34-year-old Cook County sheriff’s correctional officer in the 7900 block of South Paulina about 3:40 a.m. Sunday, and ended up shooting him in the hand, police said.

Prosecutors said the off-duty officer was in a car when Tillman approached and tapped on the car window with a gun. Tillman then shot the officer in the left hand, but ran away when the officer fired a gun.

READ MORE: SWAT Team Responds To Building In South Loop For Call Of Men With Guns Inside

The officer apparently wounded Tillman, who showed up Advocate Christ Medical Center in Oak Lawn with a gunshot wound later that day, according to prosecutors. That’s the same hospital where the officer had been taken for treatment.

Tillman, of the 1200 block of West Hastings, was arrested at the hospital about 5:15 p.m. and witnesses positively identified him in a photo lineup as the person who shot the officer, prosecutors said.

Sophia Ansari, a spokeswoman for the sheriff’s office, said in an email, “It appears the officer is going to be OK,” adding, “Our primary concern is for the safety and well-being of our officer.”

Police said Sunday the officer’s condition had stabilized.

MORE NEWS: AAA Estimates 1.7 Million Illinoisans Will Hit The Road For Memorial Day Weekend -- How Do They Come Up With Their Predictions?

(Source: Sun-Times Media Wire © Chicago Sun-Times 2014. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.)