The gun-toting car thief shot by cops in the Bronx had been in prison for nearly 30 years for armed robbery — and had just been paroled in April, police sources said Monday.

Suspect Ronnie Cole, 58 — who pressed his pistol against an officer’s chest and snarled, “I have a gun, f–king die’’ when he was caught trying to swipe a BMW on Sunday night — had been put on lifetime parole, sources said.

“He had two shotgun collars, where he robbed people with a shotgun,” a high-ranking police source told The Post of the suspect’s prior arrests. “He was on parole for life.”

NYPD Chief of Department Terence Monahan said Cole had eight previous felony convictions, including five for violent crimes such as armed robbery.

Cole did four years in state prison, from 1984 to 1988, for burglary and robbery, then went in the slammer again in 1991 for robbery and weapons possession, records show.

He was paroled in April from the upstate maximum-security Five Points Correctional Facility, according to records.

Cole, who was shot three times by cops in Sunday’s confrontation, is still hospitalized with wounds to his chest, arm and leg. The involved officers weren’t injured.

Additional reporting by Nolan Hicks