• BREAKING NEWS ABC shows live and on-demand -- Download the WATCH ABC app!

OTRC: Redmond O'Neal avoids jail in heroin, gun possession case

Pictured: Redmond O'Neal appears at a Los Angeles court for his arraignment on felony drug charges on Friday Jan. 9, 2009. Right: O'Neal appears in a mug shot for his arrest on August 2, 2011.

Redmond O'Neal, the son of actor Ryan O'Neal and late actress Farrah Fawcett, has been ordered to complete a rehab program after pleading no contest to felony possession of heroin and unlawful possession of a firearm by a convicted felon, charges that could have landed him back in jail.

The 26-year-old entered his plea at a Los Angeles court on Wednesday, August 24. Redmond O'Neal was detained near the city earlier this month for a suspected traffic violation and charged on August 4. Authorities said they found heroin in his vehicle and after they executed a search warrant at his apartment, they also found a 9 mm semi-automatic handgun in his residence.

On Wednesday, Redmond O'Neal was sentenced to to five years of probation and ordered him to undergo rehab at a facility for 365 days. He is set to travel there straight from jail, where he has been locked up since his arrest after being denied bail. Redmond O'Neal has battled substance abuse and has served time behind bars in the past.

Prior to the incident, Redmond O'Neal was on probation for a 2009 drug case. On Wednesday, he was also sentenced to 33 days behind bars for violating it, but was credited for time served. His previous probation was extended to September 2014.

The Los Angeles District Attorney's Office told OnTheRedCarpet.com earlier this month that Redmond O'Neal's charges could have led to a prison sentence lasting more than three years.

Redmond O'Neal, Fawcett's only child, was treated for heroin addiction in 2004. In 2008, he suffered a relapse and was arrested and convicted of drunk driving and drug possession and was given probation. Also that year, he and his father were arrested at the actor's Malibu home for alleged possession of methamphetamines. The two were eventually ordered to complete treatment programs.

In April 2009, Redmond O'Neal was arrested and charged on suspicion of bringing heroin into a Los Angeles jail, which he had visited with a friend. He was detained behind bars and was released temporarily to be able to go see Fawcett, who was battling cancer, in a hospital. The "Charlie's Angels" actress died the following June at age 62. Redmond O'Neal was also allowed to attend her funeral.

In September of that year, Redmond O'Neal pleaded no contest to his charge. He was sentenced to 249 days in county jail and given probation for three years. He served 167 days in custody and released early, after which he was sent to rehab. He completed his treatment for drug addiction in August 2010.

Ryan O'Neal, Fawcett's on-again, off-again life partner, has three other children. The 70-year-old "Love Story" actor's daughter, Oscar winner Tatum O'Neal, also battled a heroin addiction and spent time in rehab more than once, including in 2008 following a drug possession arrest.

She and her father star together on the OWN reality show "Ryan and Tatum: The O'Neals," which airs on Sundays.

(Copyright ©2018 OnTheRedCarpet.com. All Rights Reserved.)