BEVERLY HILLS, Calif. (CBS/AP) Updated 12:55 p.m. EST
A judge has ordered Lindsay Lohan to return to rehab instead of jail for a failed drug test, telling her she was an addict and faced jail time if she relapsed again.
Los Angeles Superior Court Judge Elden S. Fox ordered Lohan to remain at the Betty Ford Center until Jan. 3 and report back to court in late February.
A prosecutor had advocated a six-month jail sentence for the actress, but Fox opted for rehab after reviewing filings by probation and rehab officials and a letter written by Lohan.
Lohan cried after hearing the sentence.
The judge acknowledged that Lohan, 24, has been in and out of court and rehab since a pair of high-profile arrests in 2007. He told the actress that he would not be manipulated by her, but was giving her a final chance to stay clean.
"You're staying past the New Year's - there's a reason for that," he said.
Fox's sentence means Lohan will not be returning to a suburban Los Angeles women's jail for a fourth time.
The judge had threatened to send the "Mean Girls" star to jail for 30 days for each drug test she skipped or failed. He ordered her held for nearly a month during a hearing in September, but another judge overturned his ruling and Lohan has been free on bail and in inpatient rehab voluntarily since then.
Lohan has voluntarilyat the Betty Ford Center in Rancho Mirage, Calif. It's her fifth stay in a rehab facility.
The actress arrived at the Beverly Hills courthouse Friday morning about half an hour before the hearing, accompanied by her attorney and mother and flanked by deputies. She was dressed in jeans, a white T-shirt and a black jacket.
Her recent court troubles have put Lohan's career on hold. She missed opportunities to promote her role in the summer film "Machete" because she was in jail and rehab. Her next starring role is supposed to be in a biopic on porn actress Linda Lovelace.
The hearing was Lohan's fifth court appearance since May, when she ran into trouble with her probation for missing several weekly counseling sessions. She later spent 14 days in jail and 23 days in rehab as punishment.
Her legal woes are the result of drug and drunken driving charges being filed in 2007 after a pair of high-profile arrests. Lohan pleaded no contest to two counts of driving with a blood-alcohol level above 0.08 percent and one count of reckless driving. She was sentenced to three years of probation, but that was later extended after the actress didn't complete the terms of her sentence in time.
Fox allowed her to be released from rehab early based on the recommendations of her doctors and laid out a path for her to be taken off probation by the end of the year. His regimen included frequent counseling sessions, meetings with probation officials and random drug screenings. It also included several incentives, including an assurance that if the actress complied with the terms for 67 days, her probation oversight would end and she would be free to move from Los Angeles. He also dismissed two drug charges that were filed after a pair of arrests in 2007.
Within weeks of her release from rehab, Lohan, 24, failed a drug test. She acknowledged the result in postings on her Twitter account.
"Substance abuse is a disease, which unfortunately doesn't go away over night," she wrote at the time. "I am working hard to overcome it and am taking positive steps.
Other posts said, "This is certainly a setback for me but I am taking responsibility for my actions and I'm prepared to face the consequences," "I am so thankful for the support of my fans, loved ones and immediate family, who understand that i am trying hard" and "but also that I am a work in progress, just as anyone else. I am keeping my faith, and I am hopeful....Thank you all!!!"
Lohan pleaded no contest to two counts of driving with a blood-alcohol level above 0.08 percent and one count of reckless driving in 2007. She was sentenced to three years of probation, but that was later extended after the actress didn't complete the terms of her sentence in time.