The actress, 24, checked in earlier this week at the venerable Betty Ford Center, near Palm Springs, where she plans to stay until an Oct. 22 hearing to answer to a failed drug test while on probation in a DUI case, sources tell PEOPLE.
A legal source close to Lohan says that although the move could affect how harshly the judge punishes her, Lohan entered the 30-day program "out of a recognition that she really needs the help from professionals and great medical care to help her rebuild her life."
The source adds there's no guarantee Lohan can avoid jail time despite how well she does at Betty Ford or how long she stays. But even if the judge sentences her to 30 days in jail, as he has threatened to do, Lohan may serve less – or no – time because of overcrowding.
Still, another source close to Lohan tells PEOPLE, "She's trying to help herself and she knows the severity of this."
The Betty Ford Center in Rancho Mirage, 100 miles east of Los Angeles, has treated a who's who of celebrities with addiction problems, with recent patients including Keith Urban, who was visited by wife Nicole Kidman during his stay, to the newly named American Idol judge, Steven Tyler of Aerosmith.
Other famous faces include Elizabeth Taylor, Kelsey Grammer and Liza Minelli and Lohan's own father, Michael Sr.
Jane Robison, a spokeswoman for the Los Angeles District Attorney's Office, says she doesn't know what the office will ask for at the Oct. 22 hearing or to what extent the stay in rehab will influence the prosecutor or the judge.
Robison notes, however, that some of the work that Lohan will do in rehab will help fulfill previous requirements by the court. Lohan was ordered Aug. 25 to attend two behavioral therapy sessions a week, have seven contacts per week with a counselor for chemical dependency issues, attend 12-step classes five days a week, and attend four psychotherapy sessions a week.
Additional reporting by ELIZABETH McNEIL