Lindsay Lohan needed an Oscar-winning performance in her probation hearing to avoid jail time.
She did not deliver.
"I did the best I could," Lohan tearily told Superior Judge Marsha Revel in her own defense in Beverly Hills, Calif. on Tuesday.
But Revel, citing a litany of Lohan's past lies and misstatements regarding her run-ins with the law, sentenced the actress to 90 days in jail, and a 90-day in-patient drug treatment program.
The judge's ruling caused Lohan to break down in sobs.
Revel issued the sentence after listening to testimony from employees of an alcohol treatment program that Lohan had been ordered to attend in a 2007 drug case.
Lohan missed seven classes since December, which led to the judge's harsh rebuke of Lohan moments after the "Mean Girls" star offered a tearful apology.
"I did do everything I was told to do and did the best I could to balance jobs and showing up," Lohan told the judge. "It wasn't vacation, it wasn't some sort of a joke."
Revel said she found Lohan's apology insincere, comparing it to "somebody who cheats and thinks it isn't cheating if she doesn't get caught."
Lohan was not immediately taken into custody and will be permitted to surrender on July 20. She will have to wear an ankle alcohol monitor until then.
Los Angeles County district attorney spokeswoman Jane Robison said it was not uncommon for judges to allow defendants to turn themselves in at a later date so they can get their affairs in order.
The sentence tripled the monthlong jail sentence prosecutors had sought for Lohan.
It was unclear how much time Lohan will actually spend in jail. Los Angeles Sheriff's Department spokesman Steve Whitmore said female inmates convicted of nonviolent misdemeanors serve about a quarter of their sentence but that can be further reduced by state credits.
Whitmore said Lohan might be released on house arrest, but it would depend on the specifics of Revel's order.
Revel revoked Lohan's probation and ordered her to wear an ankle alcohol monitor after the starlet missed a court date in May. She was promoting a film project at the Cannes Film Festival at the time and claimed her passport was stolen.
The monitor issued an alert after the actress attended the MTV Movie Awards and after-parties last month. Revel said the device registered a .03 blood alcohol level at the time. Lohan has denied drinking that night.
Lohan's attorney, Shawn Chapman Holley, urged the judge to place the actress back on probation, saying she had learned her lesson and had improved.
Prosecutor Danette Meyers disagreed and urged jail time for the star.
"When you ordered her to go every week, it didn't catch her attention," Meyers said in a closing statement.
Lohan spent 84 minutes in jail in 2007 after she pleaded guilty to two misdemeanor counts of being under the influence of cocaine and no contest to two counts of driving with a blood-alcohol level above 0.08 percent and one count of reckless driving.
The plea came after a pair of high-profile arrests earlier that year. Lohan was sentenced to three years of probation but had to ask for a yearlong extension in October after she failed to complete her alcohol-education courses on time.
The Associated Press contributed to this report.