Actress Lindsay Lohan was sentenced to jail Wednesday after she admitted that she was in violation of her probation.
"Miss Lohan is going to waive her right to a hearing and admit the violation," her attorney said at the start of court proceedings Wednesday in Los Angeles.
Lohan was ordered to surrender by Nov. 9 at the Century Regional Detention Facility in Lynwood.
Local news from across Southern California
"I'm giving you the keys," Judge Stephanie Sautner said. "You need to do these 30 days."
Sautner sentenced Lohan to 30 days, but because of jail overcrowding, it's possible she may book in, stay overnight and leave the following day. The actual length of the term will be set by the Sheriff's Department.
Lohan will not be eligible for early release or home detention.
The judge explained a complicated sentence in which Lohan will have to complete her previously ordered community service at the Los Angeles County Coroner's Office or risk an additional 270 days in jail.
Two weeks ago, Sautner scolded Lohan after hearing prosecutors' argue that she do jail time for failing to attend court-ordered community service at the Downtown Women's Center. Sautner said the morgue was about the only option.
"The Downtown Women's Center is willing to take you back, but I'm not going to put them through that again," Sautner said Wednesday. "I looked into another group, the Good Shepherd Center for Homeless Women. They refused to take you because they said you were a bad example for women who are trying to get their lives in order.
"The morgue was willing to keep you."
At Lohan's Oct. 19 hearing, Sautner revoked the actress' probation stemming from a DUI and a jewelry theft case. The judge ordered Lohan to complete 16 hours of community service at the morgue before a follow-up hearing on Wednesday.
Sautner had strong words for Lohan at the hearing, too.
"Miss Lohan has created an impossibility to perform this sentence that was given to her by her own actions," said Sautner, who told the actress that probation was "a gift."
Lohan pleaded no contest May 11 to a misdemeanor grand theft charge involving a necklace priced at $2,500 that was taken from a Venice jewelry store. She was given three years probation and ordered to spend 120 days in jail and complete the 480 hours of community service to which she had been previously sentenced for violating her probation in a 2007 misdemeanor DUI case.
Lohan was ordered in May to complete the 480 hours of community service by April 2012, but her attorney acknowledged that the Downtown Women's Center terminated Lohan's volunteer assignment after the missed appointments.
That led to Sautner's revocation of probation order. She was told to complete her service at the morgue, but even that led to drama.
Lohan was sent home after showing up late for her first day of service at the morgue. Under a threat she would be removed from the program if that happened again, Lohan arrived early for service the next day.
Lohan's probation in the 2007 DUI case will be terminated at the end of March if she adheres to the schedule. Her probation in the jewelry theft case will be downgraded to probation.
Follow NBCLA for the latest LA news, events and entertainment: