Former US teen heart-throb Leif Garrett has pleaded no contest to heroin possession at a Los Angeles court.
The 48-year-old was arrested in February after police found him with the drug in a subway station.
However the case could be dismissed if the actor completes a drug rehabilitation programme within 18 months.
Garrett was previously sentenced to 90 days in jail for heroin possession in 2006.
He has had a series of drug arrests since the height of his popularity in the 1970s.
"I just think this is in everybody's best interests," the actor's lawyer, Andrew Flier, said.
He added he was proud of Garrett for entering the plea and recognising that he needs additional treatment.
The actor, who also released 10 albums, appeared in films including 1983's The Outsiders, alongside Rob Lowe, Emilio Estevez and Tom Cruise.