Prosecutors say Redmond O'Neal has pleaded no contest to bringing drugs to a jail facility and will be sent to a yearlong rehab program.
The Los Angeles County District Attorney's Office says the son of actors Ryan O'Neal and Farrah Fawcett entered his plea Friday. He will be released from jail and allowed to enter a residential treatment program.
The younger O'Neal has been held since his April arrest for carrying drugs onto the property of a jail north of Los Angeles. It was the latest in a string of drug-related arrests for the 24-year-old.
O'Neal also received three years of probation but faces six years in prison if he gets in trouble again.
He was briefly released to see Fawcett before she died and to attend her funeral in June.