Updated

Rock star Courtney Love (search) pleaded guilty Tuesday to a misdemeanor count of being under the influence of a controlled substance and agreed to enter a drug rehabilitation (search) program.

"Guilty," Love said softly when the judge asked for her plea.

Love, 39, also answered "Yes" several times when asked if she understood the terms of the plea agreement. Sentencing was set for July 16.

Assistant City Attorney Jerry Baik told reporters that the rehabilitation effort will last several months and is an outpatient program that includes classes, counseling and probably random drug testing (search).

At the end of the program, Love may petition to have the case dismissed. If she fails the drug program, she could be sentenced to at least 90 days in jail.

The count to which she pleaded involved cocaine and other opiates found in her system. A count of disorderly conduct will most likely be dismissed at sentencing, Baik said.

Love, in a lilac sweater, floral print dress and teal high heels, was low key compared to recent court hearings, including a rambling speech in the women's bathroom after a court appearance in New York earlier this month. On Tuesday, Los Angeles Superior Court Judge Patricia M. Schnegg had to ask her to speak up.

Love separately faces felony charges in Beverly Hills, where she has pleaded innocent to illegally possessing prescription painkillers. She could face up to three years and eight months in prison if convicted in that case.

The two cases stemmed from encounters with police on the same night last October.

Love was initially arrested after allegedly trying to break into the home of a former boyfriend. After being released, officers responding to a call from Love, went to her home and she gave them a small bag of pills, according to a police officer's testimony.

On May 13, Love was arraigned in New York on charges of assault and reckless endangerment for allegedly hitting a fan with a microphone stand at a club in March.