NEW YORK — A former “Sopranos” actor convicted for his real-life role in a botched burglary in which an off-duty police officer was killed was released from prison Tuesday on parole.

Lillo Brancato Jr. was freed after serving time for a 2008 burglary conviction. At the same trial, he was acquitted on a second-degree murder count that carried a possible sentence of 25 years to life.

Brancato was sentenced to 10 years in prison in January 2009. At the time, he had already served three years and was eligible for parole at the end of this year.

Brancato was an unknown when he got his big break starring opposite Robert De Niro in the 1993 film “A Bronx Tale.” He later landed smaller film and television roles, most memorably in “The Sopranos,” playing a bumbling, wannabe mobster who gets killed by Tony Soprano.

By 2005, Brancato started having minor brushes with the law, including an arrest for heroin possession. He began hanging out with Steven Armento, a low-level Genovese crime family associate until he was banished for drug addiction, authorities said.

According to prosecutors, the actor and the older man were drinking in the Bronx when they decided to break into a basement apartment nearby and steal Valium. Armento had a handgun.

The sound of shattering glass awoke off-duty Officer Daniel Enchautegui. He grabbed his badge and gun and confronted the men in an alley. A fierce gunbattle erupted, with Armento firing first, prosecutors said.

Enchautegui suffered a fatal wound to the chest. Before he died, he managed to empty his pistol, hitting Armento six times and Brancato twice, police said. Backup officers caught a bloodied Brancato trying to get into his car, while Armento had collapsed nearby.