LAS VEGAS (AP) - Just a few years ago, Paris Hilton claimed her lawless days were behind her after she served 23 days in jail for violating probation.
These days, however, it's unclear exactly what the celebrity socialite learned from her time behind bars.
Hilton, whose partying brought her worldwide notoriety, acknowledged in a court appearance Monday that she stashed cocaine in her purse and lied to police during her arrest last month at a Las Vegas resort.
Under the terms of a plea deal, the 29-year-old Hilton pleaded guilty to drug possession and obstructing an officer, both misdemeanors. She must serve a year of probation, complete a drug program, pay a $2,000 fine and serve 200 hours of community service.
If she violates her probation, she could get a year in jail.
"Treat this very seriously," Justice of the Peace Joe M. Bonaventure cautioned Hilton. "The Clark County Detention Center is not the Waldorf-Astoria."
Hilton's attorney David Chesnoff said she would attend an outpatient substance abuse treatment program.
"I know Ms. Hilton is contrite and accepts the responsibility for her actions," Chesnoff said.
It was Hilton's latest encounter with the law since 2006, when she was arrested in Los Angeles on suspicion of driving under the influence. She later pleaded no contest to alcohol-related reckless driving and was put on probation, which she later violated by driving with a suspended license. Hilton served 23 days in jail because of the violation.
"It was a pretty traumatic experience, something that I really have grown from," Hilton told CNN's Larry King.
In July, she briefly faced a marijuana case after a FIFA World Cup game in South Africa, but the allegation was dropped when a woman who was with her pleaded guilty to carrying the drug.
Hilton was arrested again on Aug. 26 inside the Wynn resort on the Las Vegas Strip. Police said a small bag containing 0.8 of a gram of cocaine fell from her Chanel purse as she reached for a tube of lip balm in front of a police lieutenant.
Hilton told police the purse and cocaine were not hers.
"I asked Hilton whose cocaine it was, and she said she had not seen it but now thought it was gum," Las Vegas police Lt. Dennis Flynn wrote in his report.
Hilton had been pulled aside by police after her boyfriend, Las Vegas nightclub mogul Cy Waits, 34, failed field sobriety tests given by a motorcycle officer, the report said.
The couple was stopped in a black Cadillac Escalade after the officer smelled what the report called a "vapor trail" of marijuana smoke.
Waits was arrested on suspicion of misdemeanor driving under the influence of alcohol or drugs. A toxicology report is pending.
Hilton was banned from two Wynn resorts after the arrest, and Waits was dismissed as a partner in the venue's nightclub.
At the Las Vegas Justice Court, a gaggle of photographers and onlookers followed Hilton as she climbed into a black Cadillac Escalade after the hearing.
Hilton, wearing a champagne-colored blouse, black pencil skirt and black platform heels, did not address the crowd when she went in or out of court, mouthing "thank you" only after a fan yelled, "You're beautiful, Paris."
Hilton won't have to report to a probation officer under the plea agreement.
She originally faced a felony cocaine possession charge that also would not have resulted in jail time but could have brought up to three years probation.
Hilton's attorney and a Clark County prosecutor both stressed that a legal red carpet had not been rolled out for the hotel heiress.
"She was treated like anybody else would be treated under the circumstances," Chesnoff said.
Hilton plans to continue volunteering with animal advocacy groups and children's hospitals to complete her community service hours, he said.
Associated Press Writer Oskar Garcia contributed to this report.