Lindsay Logan has been ordered to return to rehab instead of jail for a failed drugs test.
Los Angeles Superior Court Judge Elden S Fox has ordered the actress to continue rehab until January 3.
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 rehab since then.
Her current legal woes are the result of drug and drunken driving charges being filed in 2007 after a pair of high-profile arrests.
The judge told Lohan she is an addict and faced jail if she relapsed again. Lohan cried after hearing the sentence. The judge told the actress he would not be manipulated by her, but was giving her a final chance to stay clean.
"You're staying (in rehab) past the New Year's - there's a reason for that," Judge Fox said. Lohan is due back in court on February 25.
Authorities later said the troubled actress's father had been hurt in an attack in a California car park.
Michael Lohan was getting into his car on Thursday night when a man attacked him with a sharp object, police said. He sustained minor lacerations to his neck and forearm. Sgt Jay Trisler said the suspect was 40 to 50 years old and used some sort of sharp-edged device.