Lindsay Lohan was freed from a suburban Los Angeles jail late Friday night, well short of the nearly month-long stay a judge had intended for the actress following a failed drug test.
Lohan was let go at about 11:40 p.m. after posting $300,000 bail, said Los Angeles County Sheriff's Department spokesman Steve Whitmore.
Scroll down to watch Lindsay Lohan video
Los Angeles Superior Court Judge Elden Fox ordered Lohan held without bail during a brief hearing Friday morning, but his ruling was later overturned.
The actress is not entirely free. She will be required to wear an ankle alcohol monitor and stay away from establishments that primarily sell alcohol until her next court date, on Oct. 22.
At that hearing, Fox will formally determine whether Lohan, 24, violated her probation by failing a court-mandated drug test. The positive result came after the judge released Lohan early from inpatient rehab at Ronald Reagan UCLA Medical Center.
He has said the "Mean Girls" star would be sent to jail for 30 days for each drug screening she skipped or failed and appeared to make good on the promise with his no bail order.
If he sentences her to jail in October, the amount of time her orders her to serve would be whittled down because of jail overcrowding and various credits.
Lohan "came in (to the courtroom) looking very calm" Friday morning, "Inside Edition" Chief Correspoondent Jim Moret tolf "Early Show on Saturday Morning" co-anchor Chris Wragge. "She was smiling. I was sitting about 10 feet away from her. She was talking to her mom, who was behind her, smiling, gave her mom a thumbs-up before the judge walked in. Even her attorney didn't see this coming, because, originally, the (follow-up) hearing was set for Oct. 22. Her attorney said, 'How about moving it to the 29th? And the judge said, 'I think your client wants it to be a shorter hearing,' and that was our indication that she was going right to jail. Everyone was blind-sided about this decision."
Friday marked the third time Lohan has been sent to jail in a three-year-old drug and drunken driving case. She spent 84 minutes at the jail in 2007 and 14 days of a three-month sentence earlier this summer.
Fox had laid out a strict 67-day course of counseling, substance abuse meetings, monitoring and drug testing for Lohan in August. He asked probation officials on Friday to report how the actress had progressed on the treatment programs before Lohan's next court hearing.
Lohan's mother, Dina, walked into the courtroom about 45 minutes after the hearing. By then, Los Angeles television stations were following a car said to be carrying her daughter to jail.
The two women had arrived at the courthouse together an hour before, while the actress's father - with whom she's publicly sparred - arrived earlier.
Lohan acknowledged failing a court-ordered drug screening last week in a series of Twitter postings
"Substance abuse is a disease, which unfortunately doesn't go away over night," she posted last Friday. "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!!!"
It was Lohan's first appearance before Fox, who had said at a previous hearing he would sentence her to a month in jail for each drug test she skipped or failed.
The actress wasn't present for that hearing, which was held hours after her release from rehab.
The actress remains on probation for a reckless driving and two driving under the influence charges, all misdemeanors. Fox dropped two drug cases at a hearing in August during which he announced Lohan's release from rehab and set out a strict outpatient treatment schedule that included random drug screenings.
Fox has sealed Lohan's court file, but a source familiar with the case has told The Associated Press that the actress' failed test came roughly two weeks after her release from rehab. Reports have stated that the actress failed a second drug test shortly after the first one, and that she tested positive for both cocaine and amphetamines.
More on Lindsay Lohan:
Can Lindsay Lohan, Paris Hilton Get on Track?
Strict Outpatient Care Ordered for Lohan
Lohan Out of Rehab, Early
Lindsay Lohan Shocker: Not an Addict, After All?
Lohan Trying to Revamp Her Image
Lohan Released From Jail, Goes To Rehab
Pictures: Jail Time for Lindsay Lohan
Pictures: Lindsay Lohan