LAS VEGAS (AP) - Paris Hilton acknowledged Monday that she had cocaine in her purse and pleaded guilty to two misdemeanor charges stemming from her arrest last month at a Las Vegas hotel-casino.

She will serve a year of probation and avoid a felony charge under the terms of a plea deal worked out with prosecutors. The celebrity heiress pleaded guilty to drug possession and obstructing an officer.

Hilton, 29, must complete a drug abuse program, pay a $2,000 fine and serve 200 hours of community service.

Hilton _ wearing a champagne-colored blouse, a black pencil skirt and black platform heels _ told Justice of the Peace Joe M. Bonaventure she was in possession of cocaine.

When he asked what she did to obstruct justice, Hilton, swaying side to side, responded, “I said that the purse wasn’t mine to the officer,” and acknowledged that she had bought it months earlier.

When asked why she didn’t fight the charge, her attorney, David Chesnoff said, “Ms. Hilton accepts the responsibility.”

She faces a year in jail if she violates the probation and is arrested for anything other than a minor traffic violation.

Hilton was arrested Aug. 26 inside the Wynn resort, after police say a small plastic bag containing 0.8 of a gram of cocaine spilled out of a Chanel purse she had been carrying 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, but claimed some items in the bag belonged to her, including rolling papers, $1,300 in cash and several credit cards.

She was pulled aside by police after her boyfriend, Las Vegas nightclub mogul Cy Waits, 34, failed field sobriety tests given by a motorcycle officer.

The couple was stopped in a black Cadillac Escalade after the officer smelled a “vapor trail” of marijuana smoke.

Hilton was banned from two Wynn resorts on the Las Vegas Strip after the arrest, and her boyfriend was dismissed as a nightclub partner.

Claude Hudson, 74, was removed from the courtroom after he tried to give Hilton a bag of chocolate candy. He said he recently had been released from jail and had written her several letters from behind bars.

Hilton arrived at the courthouse with a bodyguard. She was escorted by security guards to and from the courtroom, where a front row bench was reserved for her and her entourage.

During a brief news conference following Hilton’s exit, Chensoff said the hotel heiress did not receive special treatment.

“She was treated like anybody else would be treated under the circumstances,” he said.