Bruno Mars just formally pled guilty today to possession of a controlled substance.
Mars was in a Las Vegas courtroom with his lawyer, Blair Berk, when Mars pled guilty to felony cocaine possession, but if he stays out of trouble for 12 months, the charge will be dismissed -- as if it never happened.
Mars is also required to do 8 hours of private counseling and 200 hours of community service with a charitable organization. He must also pay a $2,000 fine -- which he's paying today ... because he has Bruno Mars money.
Berk tells TMZ, "We are very pleased that the prosecution has agreed to dismiss the charge."
As we previously reported, Bruno was arrested in September at the Hard Rock Hotel and Casino after a bathroom attendant told security a man was doing coke in the bathroom.