A judge sentenced Lindsay Lohan Tuesday to three months in jail and a rehab program after finding the actress had violated the terms of her probation in a 2007 drug case.
The actress immediately burst into tears after the ruling.
Superior Court Judge Marsha Revel issued the sentence after listening to testimony from employees of a court-mandated alcohol treatment program.
Lohan missed numerous classes — seven since last 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.
The actress' father and younger sister also burst into tears after the sentence was issued.
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'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.