Lindsay Lohan's third act in jail figures to be a short one.

Late Friday, the actress' attorney won a ruling clearing her release from jail if she posts $300,000 bail, roughly nine hours after another judge ordered the troubled starlet jailed for nearly a month.

Lohan's release won't mean that she's free. She will be required to wear an ankle alcohol monitor for nearly a month and can't go anywhere that alcohol is the main thing that is being sold.

She is also due back in court on Oct. 22, when the judge who curtly sent her to jail will decide what her punishment will be for failing a drug test roughly two weeks after he released her early from rehab.

The drama played out in two courthouses and a suburban Los Angeles women's jail where Lohan has been sent twice before for a three-year-old drug and drunken driving case.

Judge Elden S. Fox ordered Lohan held without bail shortly after 9 a.m. Friday in a hearing attended by both the actress' parents and two bondsmen. When Lohan's attorney, Shawn Chapman Holley, asked to argue why bail should be set, Fox replied, "Nope."

Bailiffs closed in and Lohan stood up. Her estranged father, Michael, said "Oh God," as she was handcuffed and solemnly led from the courtroom.

Within moments Lohan was stripped of her designer high-heel shoes and jewelry and on her way to the county women's jail, where she will be held in an isolation unit. Her mother, Dina, carried the items in a clear plastic bag from the courtroom after the hearing.

Holley returned after lunch and held a closed-door meeting with Fox, but his orders did not change. By late afternoon, as courtrooms around Los Angeles were closing down, Holley filed a motion challenging the judge's ruling.

Judge Patricia Schnegg, who is an assistant supervising judge of LA's criminal courts, issued her ruling shortly before 6 p.m.

She ruled that since Lohan had been convicted of misdemeanors, she was entitled to bail.

It was unclear when Lohan, 24, would be released.

Fox did not say why he ordered no bail for the actress, or state what drug appeared in her system during a recent test. But Lohan has repeatedly struggled with the terms of her probation for the 2007 case. She spent 84 minutes at jail that year, and returned to the facility for 14 days this summer after another judge ruled she had violated her probation.

After Lohan's former judge recused herself amid complaints from prosecutors, Fox granted the actress early release from rehab but laid out a strict 67-day course of counseling, substance abuse meetings, monitoring and drug testing.

Veteran defense attorneys said Friday that Fox ordered Lohan sent to jail for nearly a month because he felt she might continue to violate the terms of her probation.

"When you put the judge in a tight spot, he has no alternative," said Barry Gerald Sands, a defense attorney who has represented celebrity clients in drug cases and was present in court Friday.

Michael Nasatir, another defense attorney not handling Lohan's case, said judges only send people to jail on misdemeanors without bail if they feel the person is likely to violate the terms of their probation.

"The judge must think there is no other answer," Nasatir said.

Fox had said he would send Lohan to jail for 30 days for each drug test she skipped or failed, but that will be difficult. Lohan served 14 days earlier this year on a 90-day sentence, and would be released early due to overcrowding if she is returned to jail after the October hearing.

Despite her release, Lohan's continued court troubles have cast a pall over her career. She has been slated to star as Linda Lovelace in a biopic about the porn star, but the production schedule already was altered when Lohan was sent to jail in July.

In an e-mail sent before Lohan was granted bail, Matthew Wilder, the writer-director of the film titled "Inferno," said the film's producers "want her to do well." He did not address whether Lohan's role would be recast or the film further delayed.

Rehab remains a possibility for the actress, who seemed to acknowledge an addiction problem after news of her positive drug test broke last week.

"Substance abuse is a disease, which unfortunately doesn't go away over night," Lohan posted on her Twitter feed last Friday. "This is certainly a setback for me but I am taking responsibility for my actions and I'm prepared to face the consequences."

Nasatir said Lohan could still make a comeback — he's seen it with many of his clients. "Nobody's a lost cause," he said. "You can never tell when the light will come on."


AP Entertainment Writer Sandy Cohen contributed to this report.