LOS ANGELES (AP) — Lindsay Lohan isn't headed back to jail — but she won't be free to party for a while either.
The troubled 26-year-old actress accepted a plea deal on Monday in a misdemeanor car crash case that includes 90 days in a locked-down rehabilitation facility that she won't be able to leave.
Lohan, who has struggled for years with legal problems and been briefly jailed five times, pleaded no contest to reckless driving and lying to police who were investigating the accident involving the actress in June along Pacific Coast Highway.
A charge of obstructing an officer was dropped.
Lohan also was found in violation of her probation in a 2011 necklace theft and sentenced to 180 days in jail.
However, she can avoid jail time if she complies with the conditions of her plea deal, which also includes 30 days of community labor, 18 months of psychological therapy and an unspecified fine and restitution.
Lohan spoke little to Superior Court Judge James R. Dabney in court and said "yes" when asked if she accepted the plea deal. Before the "Mean Girls" actress left the courtroom, Dabney offered her a suggestion.
"Don't drive," he said.
Dabney did not set a date for Lohan to begin rehab. Instead he set another hearing for May 2, when the court must be given proof of enrollment in a treatment program.
The sentence extends Lohan's probation for another two years. Dabney warned her that there won't be any discussion about putting her back on probation if she doesn't meet the conditions of the latest sentence.
Lohan arrived nearly an hour late for Monday's proceedings and was showered with confetti as she passed through a barrage of media to enter the courthouse.
The "Freaky Friday" star reportedly missed her original Sunday night flight from New York to Los Angeles, instead traveling on a private plane provided by a Los Angeles-based energy drink company for which she has made promotional appearances.