*Bruno Mars plead guilty to cocaine possession today, three days after winning his first Grammy award, in a deal that avoids prison and could erase his felony conviction next year.

“Guilty, your honor,” the 25-year-old singer-songwriter said softly, standing in court in a dark suit with his hands at his sides.

Clark County District Judge Jessie Walsh sentenced Mars, whose real name is Peter Gene Hernandez, to probation, a $2,000 fine, 200 hours of community service at a nonprofit organization and eight hours with a drug counselor in Los Angeles.

The judge ordered the 25-year-old star to complete community service, enroll in an eight-hour counseling program and pay a $2,000 fine. If he stays out of trouble for the next 12 months, the charge will be wiped from his record.

His lawyer Blair Berk tells TMZ.com, “We are very pleased that the prosecution has agreed to dismiss the charge.”

The judge set a Jan. 18 date for him to return to court.

Mars acknowledged having 2.6 grams of cocaine when he was arrested in a bathroom early Sept. 19 after a nightclub performance at the Hard Rock Hotel & Casino in Las Vegas. Police say he told the arresting officer he never used drugs before.

The judge made sure Mars understood that he could face probation or up to four years in state prison if he violates the terms of his probation.

“You understand the penalty range?” she asked.

“Four years,” Mars replied.

As previously reported, Bruno and Janelle Monae will team for the Hooligans in Wondaland tour, to take place in May and June.