The son of actors Farrah Fawcett and Ryan O'Neal, who spent his mother's dying days in jail on a drugs charge, was ordered into a one-year treatment program on Friday for heroin possession.

Redmond O'Neal, 24, pleaded no contest -- the equivalent in California law to a guilty plea -- to possessing heroin while on bail in April for another drug offense.

A Los Angeles Superior Court judge ordered O'Neal to spend at least one year in a residential drug treatment program, and suspended a six year prison term.

O'Neal will not have to serve the prison term if he completes the program and three years probation. He has previously been before the courts in Southern California for possession of methamphetamine and heroin.

O'Neal was behind bars as his mother endured her final battle with anal cancer. Farrah Fawcett died in Los Angeles on June 25, and Redmond was released from jail for a few hours to attend her funeral.