Actress Lindsay Lohan must spend one day in jail after pleading guilty to drink driving and drug charges as part of a plea bargain.
Lindsay Lohan: "I am addicted to alcohol and drugs"
She was put on three years' probation, and must do community service and complete a drug treatment programme.
Lohan's seven charges included driving while over the alcohol limit and being under the influence of cocaine.
The actress crashed her car in Los Angeles in May and was arrested again in July after being stopped by police.
She avoided more serious charges because she was only in possession of a small quantity of drugs both times she was arrested.
Lohan must also complete an 18-month-old alcohol education programme as part of her sentence.
In a statement, Lohan said: "It is clear to me that my life has become completely unmanageable because I am addicted to alcohol and drugs.
The media camped out for the judge's verdict
"Recently I relapsed and did things for which I am ashamed. I broke the law and today I took responsibility by pleading guilty to the charges in my case.
"No matter what I said when I was under the influence, I am not blaming anyone else for my conduct other than myself. I thank God I did not injure others, I easily could have," she added.
The actress was initially ordered to serve four days in jail, but Lohan was given the option to do 10 days of community service, which knocked two days off her jail sentence.
The judge then gave Lohan one day of credit for time already served, resulting in the actress only having to serve 24 hours in jail.
She must serve her sentence and complete her community service and drug rehabilitation programme by 18 January. She must also show proof of enrolment in an alcohol education programme by that date.
Lohan's party lifestyle has been well documented in the press
Authorities say she has not benefited from any special treatment because she is a celebrity.
Deputy District Attorney Danette Meyers said, after the hearing, that if Lohan was convicted of any further drink driving charges in the future, she would have to spend a mandatory four months in jail.
Lohan is currently in the middle of rehabilitation treatment in Utah.
She was first arrested in May when she was treated for minor injuries after losing control of the Mercedes she was driving and hitting a kerb in Beverly Hills, California.
In July, she was pulled over by officers in Santa Monica on suspicion of drink-driving and possession of cocaine.
Lohan's latest film - a psychological thriller called I Know Who Killed Me - has been slated by several US film critics.