Troubled actress Lindsay Lohan is waiting to enter rehab after escaping a jail sentence over a car crash case.
The 26-year-old has accepted a plea deal that includes 90 days in a locked-down rehabilitation facility that she will not be able to leave.
Lohan has struggled for years with legal problems and has been briefly jailed five times.
In her latest case she pleaded no contest to reckless driving and lying to police who were investigating the accident involving the actress in June along the 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 labour, 18 months of psychological therapy and an unspecified fine.
Lohan said little to Superior Court Judge James Dabney in court and said "yes" when asked if she accepted the plea deal.
The judge did not set a date for the Mean Girls actress to begin rehab.
Instead he set another hearing for May 2, when the court must be given proof of enrolment in a treatment programme.
The sentence extends Lohan's probation for another two years, and the judge warned her that there will not be any discussion about putting her back on probation if she does not meet the conditions of the latest sentence.