Former US teen star Leif Garrett has been sentenced to 90 days in jail and three years' probation after opting out of a drug treatment programme.
Garrett found fame as an actor and singer
The actor has been in custody since 30 March after failing drug tests while attending a rehabilitation clinic.
Los Angeles Superior Court Commissioner Melissa Widdifield told the 44-year-old she was disappointed with his decision to leave the court-ordered programme.
Garrett made several films in the 1970s and 1980s and has released 10 albums.
His films include Bob & Carol & Ted & Alice in 1969 and The Outsiders in 1983.
Garrett was originally placed on the rehab programme as an alternative to prison time over cocaine charges.
His attorney said the actor had decided to leave the programme, which required frequent tests and daily counselling, because it was too strict.
He said Garrett was "very confident, he feels he's going to show everyone that he's drug free".