Bail was denied Tuesday for a man on parole charged with firing at an off-duty Chicago police officer Sunday in Forest Glen when the officer caught him trying to steal a catalytic converter, according to prosecutors.

John “Jimmy” Fleming, 27, was shot in the hip when the officer returned fire, prosecutors said.

Fleming was not in present for a hearing Tuesday at the Leighton Criminal Court Building, where he faced a count of attempted first-degree murder of the officer, due to his continuing treatment for the gunshot wound, a CPD officer testified.

Judge David Navarro, citing Fleming’s status as a parolee and the possible 80-year prison sentence he faces if convicted of the charge, ordered Fleming held without bail.

The off-duty Town Hall District officer was on his way into work about 8:30 a.m. in his Jeep when he approached a black Audi SUV blocking the street in the 5200 block of North Lawler Avenue.

The officer saw a man, later identified as Fleming, at the passenger side door of the Audi holding a handgun and another man underneath a nearby white SUV who was holding a reciprocating saw, Cook County prosecutors said in court.

The officer, who was not wearing his full police uniform but had a hat with a CPD star patch on it, got out of his Jeep and announced he was a police officer, prosecutors said. Fleming then turned toward the officer and fired; the officer returned fire, striking Fleming in the hip, prosecutors said.

After being shot, Fleming fell or jumped on the hood of the black Audi as the man who was under the white SUV drove off in the black Audi, prosecutors said. At Lawler and Elston avenues, Fleming got back inside the black Audi and was seen by a witness, who later identified him in a photo array, prosecutors said.

A half-hour after the shooting, Fleming was dropped off in the black Audi at St. Bernard Hospital, where he sought treatment for a gunshot wound he said he had suffered in a shooting at 64th and Sangamon streets, prosecutors said. He was later transferred to Stroger Hospital, where he was taken into custody after being identified by the off-duty officer.

Shortly after noon Sunday, police recovered the black Audi, which was stolen the day before from an unspecified location on north Rush Street, abandoned in Pilsen, prosecutors said. Police recovered blood and fingerprints inside the vehicle, as well as an unfired 9-mm bullet.

Police believe the black Audi may be connected to other catalytic converter thefts recently in the Forest Glen area, prosecutors said.

Fleming is on parole after pleading guilty to unlawful use of a weapon by a felon last September, according to prosecutors. He has previously been convicted on three separate occasions for possession of a controlled substance.

Fleming’s next hearing was set for Monday.

Related 2 teens in custody after shots fired at Chicago cops in Austin

Read more on crime, and track the city’s homicides.