Los Angeles (CNN) -- Lindsay Lohan's convoluted path through the legal system, which began with a drunken driving arrest nearly five years ago, reached a resolution Thursday as a judge ended her formal felony probation.
The actress' struggle with drugs and alcohol sent her to five rehab facilities for a total of 250 days since January 2007.
Lohan has appeared in court 20 times before four judges who have found her in violation of her probation four times and sentenced her to six months in jail. Still, she spent less than two weeks behind bars in her six trips to the Los Angeles County jail. Measures to relieve jail overcrowding led to her release after just hours in all but one of those visits. Lohan did spend 35 days confined to her Venice, California, home.
Lohan also served about 67 days of community service, mostly working at the Los Angeles County morgue.
Lohan's troubled timeline is lengthy:
• January 2007: Lohan enters a drug rehab program for the first time. She continues work on the movie "I Know Who Killed Me" during her 30-day stay at the Wonderland Center in Los Angeles.
• May 26, 2007: The actress is arrested on a misdemeanor drunken driving charge after she lost control of her Mercedes-Benz convertible and struck a curb in Beverly Hills, California. She checks into Promises Treatment Center in Malibu for her second visit to rehab. Lohan is voluntarily fitted with an alcohol monitoring bracelet after her release from her 45-day rehab stay.
• July 24, 2007: Just two weeks after checking out of rehab, she is arrested again. A woman called Santa Monica police, saying Lohan was trying to run her down with a car. Lohan is charged with drunken driving, cocaine possession and driving with a suspended license.
• August 2007: Lohan enters rehab for a third time, this time at the Cirque Lodge Treatment Center in Sundance, Utah.
• August 23, 2007: She pleads guilty to misdemeanor cocaine use and driving under the influence. The actress is sentenced to serve one day in jail, 10 days of community service and three years of probation; to pay a fine; and to enter an alcohol education program.
• October 5, 2007: She leaves the Cirque Lodge Treatment Center.
• November 15, 2007: Lohan serves just 84 minutes in a Los Angeles County jail. The sheriff explains that jail overcrowding allowed him to shorten her stay.
• March 13, 2009: An arrest warrant is issued for Lohan because of a probation violation allegation. The judge drops the warrant several days later when she decides that Lohan was in full compliance, but the paperwork was not updated.
• October 16, 2009: A Beverly Hills judge extends Lohan's probation for the drunken driving conviction for a year to give her more time to complete a required alcohol counseling program. Judge Marsha Revel warns Lohan that she will go to jail if Revel hears again that the actress had not been attending meetings. The judge says that while she wanted Lohan to have her career, Lohan cannot "thumb your nose" at the court.
• May 20, 2010: Lohan misses a required court hearing in which the judge was to determine whether she had been attending weekly alcohol counseling sessions as ordered. Defense lawyer Shawn Holley tells the judge Lohan is unable to fly back from the Cannes Film Festival in France because she lost her passport. An arrest warrant issued by the judge at the hearing is withdrawn after a representative for the actress-singer posted her $100,000 bail.
• May 24, 2010: New bail conditions are imposed on Lohan when she appears at a rescheduled hearing. A stern-faced Revel orders a drinking ban, random weekly drug testing and that the actress be fitted again with a bracelet to detect alcohol.
• July 6, 2010: Revel orders Lohan to serve 90 days in jail for missing alcohol counseling sessions in violation of her probation. The judge also orders Lohan to spend 90 days in a drug and alcohol rehab program after her jail term is completed. "I did do everything that I was told to do and did the best I could," a sobbing Lohan tells the judge. Photos later reveal that there is a profane message painted on her fingernails during the hearing.
• July 20, 2010: Lohan is put in handcuffs in a Beverly Hills courtroom and taken to jail to begin her term.
• August 2, 2010: Lohan is released from the Lynwood Correctional Facility after less than two weeks behind bars. She is immediately taken to Ronald Reagan UCLA Medical Center in Los Angeles to begin her court-ordered rehab.
• August 24, 2010: Lohan is released from rehab after just 23 days.
• August 26, 2010: Judge Eldon Fox, who replaced Revel, imposes a new set of probation rules that allow Lohan to live in her West Hollywood, California, home. "She has learned her lesson," defense lawyer Holley tells the judge.
• September 17, 2010: Lohan acknowledges through Twitter postings that she failed a drug test, but the actress says she's "working hard to overcome" her drug addiction. "Regrettably, I did in fact fail my most recent drug test and if I am asked, I am prepared to appear before judge Fox next week as a result," Lohan tweets. A probation report released later reveals that the drug test failure involved cocaine and amphetamines.
• September 24, 2010: Lohan returns to court, where Fox orders the preliminary revocation of her probation, based on a probation report saying she tested positive for controlled-substance use. She shows no emotion as deputies cuff her hands behind her back and walk her out of the Beverly Hills courtroom for the drive to jail. Lohan is released that night after another judge overturns the decision and grants a $300,000 bail. She is fitted with another alcohol-detection bracelet.
• September 28, 2010: Lohan checks herself into the Betty Ford Center in Rancho Mirage, California, for substance abuse rehab.
• October 22, 2010: Fox orders Lohan to remain in a drug rehabilitation program until January 3 for a probation violation. He warns that if she violated the rules of her rehab program or fails a drug test before her next court date, February 25, she will be sent to jail for 180 days. Staying clean and sober until then will end Lohan's supervised probation, and she could "put this long episode behind you," Fox says.
• December 12, 2010: Lohan is involved in an incident with Dawn Holland, a Betty Ford Center staffer who is later fired after information was leaked to the media.
• January 3, 2011: Lohan leaves the Betty Ford Clinic and moves into an apartment in Venice, California.
• January 4, 2011: The Riverside County Sheriff's Department says Lohan violated probation when she allegedly tussled with Holland during rehab. Authorities say they will send the result of their investigation to the district attorney's office to decide whether the actress should face battery charges. Holland has says she will no longer cooperate with the investigation and does not want charges filed, the department says.
• January 22, 2011: While shopping in Venice, Lohan visits the Kamofie and Company jewelry store. She allegedly walks out with a "one of a kind" necklace, valued at $2,500, around her neck. A store clerk calls police to report it missing, triggering an investigation by the Los Angeles Police Department.
• February 1, 2011: The Los Angeles Police Department's Pacific area obtains a search warrant to look in Lohan's Venice apartment for the missing necklace. It is handed over to police by someone associated with the actress before the search could begin.
• February 9, 2011: Lohan is charged with felony grand theft by the Los Angeles County District Attorney. Her arraignment is set for that afternoon.
• February 23, 2011: Lohan makes her eighth court appearance in nine months for a hearing set by Judge Keith Schwartz. The hearing is scheduled to consider her probation after the theft charge.
• March 10, 2011: Lohan's ninth court hearing in 10 months occurs as the judge gives her two weeks to decide whether she's going to accept a plea deal or move closer to taking the theft case to trial.
• March 24, 2011: Lohan rejects a plea deal. A preliminary hearing is set for April 22, so a judge could hear evidence to determine whether the case should go to trial.
• April 22, 2011: Lohan spends five hours in custody before posting a $75,000 bail after being sentenced to 120 days in jail for violating her drunken driving probation by being charged with theft. She is also ordered to perform 480 hours of community service. Her felony theft charge, however, is reduced to a misdemeanor.
• May 6, 2011: She begins community service at the Downtown Women's Center in Los Angeles.
• May 11, 2011: At a hearing that Lohan was not required to attend, her lawyer enters a no contest plea -- equivalent to a guilty plea -- to the misdemeanor shoplifting theft charge on her behalf. Los Angeles County Superior Court Judge Stephanie Sautner sentences her to a 120-day sentence and 480 hours of community service for a necklace theft charge, to run concurrently with the probation violation sentence. A probation report released by the court says that despite several months in court-ordered drug rehab the previous year, Lohan "appears to be continuing to struggle with substance abuse issues."
• May 26, 2011: Lohan reports to a Los Angeles jail to begin serving her theft sentence. She is fitted with an electronic ankle bracelet and released to serve her time in home confinement.
• June 23, 2011: A failed alcohol test during home confinement forces Lohan back to court, but the judge acknowledges that she failed to renew the random alcohol and drug testing as part of her probation. Sautner, however, tells Lohan she is guilty of "extremely poor judgment" by having roof parties while on home confinement, "but poor judgment is not a violation of your probation."
• June 29, 2011: Lohan is released from home confinement 35 days after she began serving her sentence for misdemeanor theft and probation violation. Lohan must resume work on the 480 hours of community service ordered as part of her sentence, including 360 hours at the Los Angeles Downtown Women's Center and 120 hours at the county morgue.
• July 21, 2011: A probation hearing shows that Lohan's in compliance with her community service, fines and shoplifting counseling requirements, but she has not signed up for the court-ordered psychological counseling. Her lawyer explains that a lapse in Lohan's health insurance -- because she's not been working in the past year -- prevented her from paying for the counseling.
• October 19, 2011: Sautner revokes Lohan's probation for failure to comply with her community service. She was supposed to be performing community service at a downtown Los Angeles women's center, but Lohan posted nine excused absences at the center since her last court hearing on July 21 -- and performed, at most, only two hours of service. Lohan is removed from the courtroom in handcuffs. She posts a $100,000 bail and is freed within two hours of her arrest.
• October 20, 2011: Lohan arrives late and misses her first day of community service at the Los Angeles County morgue, one day after a judge rebuked her for similar failures. The coroner's office gives her a second chance to appear on time the next day.
• November 2, 2011: Sautner orders Lohan to serve a 30-day jail term for violating her probation on a necklace theft conviction by missing community service work. After the jail time, the actress must work at least 12 days a month at the county morgue until she completes the 53 remaining days on her court-ordered community service and she must attend 18 psychotherapy sessions. If Lohan misses any of those goals, she will be returned to jail for another 270 days, the judge rules. If she stays on track, her probation will be eased on March 29, 2012.
• November 7, 2011: Lohan is released from jail just hours after she was booked into the Century Regional Detention Facility in Lynwood, California.
• December 14, 2011: At the monthly probation hearing, Lohan's judge is pleased with how well the actress is complying with her probation requirements in the previous six weeks. Lohan worked 12 days at the county morgue and took part in five psychotherapy sessions over the past month as ordered, Sautner said. "The morgue seems to be pleased, as pleased as a morgue can be," Sautner says.
• January 14, 2012: Lohan gets another glowing probation report, staying on track and avoiding jail. "She's done it all on schedule," Sautner says. "Just keep doing what you're doing."
• February 22, 2012: The judge tells Lohan, "You're in the home stretch." February is the third straight month of positive reports for Lohan and a major change from recent years in which she was found in violation of probation for failed drug and alcohol tests, missed counseling sessions and community service work and a shoplifting arrest.
• March 29, 2012: Lohan thanks Judge Sautner "for being fair" as she ends the felony probation, but Lohan remains on informal probation for two more years on last year's misdemeanor shoplifting conviction. "I know it's hard when people are following you all over the place, but that's the life you chose," the judge tells Lohan, advising her to "live your life in a more mature way, stop the nightclubbing and focus on your work."