Following news reports over the weekend, Paris Hilton formally pleaded guilty to misdemeanor drug possession and misdemeanor obstructing an officer in her cocaine arrest case in a Las Vegas courtroom Monday.
As part of the plea deal, the heiress, 29, will avoid jail and serve a year of probation.
During her court appearance, Las Vegas Justice of the Peace Joe Bonaventure warned her that if she is arrested during this period, she will have to serve one year behind bars.
"The Clark County Detention Center is not the Waldorf Astoria," he snapped.
Hilton, who appeared calm and collected in court, also must complete a substance abuse program, pay a $2,000 fine and perform 200 hours of community service.
Hilton was arrested Aug. 28 in Las Vegas after police found less than a gram of cocaine in her Chanel purse. She was later charged with felony drug possession.
In 2007, she served three weeks in the slammer for violating probation in a drunken driving case.