Earlier today, Bruno Mars pleaded guilty to possession of cocaine in a Las Vegas courthouse. The singer was arrested and charged with possession of the substance last September. He was arrested after a bathroom attendant at the Hard Rock Hotel and Casino reported that there was a man blowing cocaine in the bathroom.

Bruno Mars, whose real name is Peter Hernandez, was cut a deal for pleading guilty to the felony charges. In an exclusive courtroom video released by TMZ, Bruno Mars can be seen sitting at a table while his lawyer, Blair Berk, speaks with the judge.

The cocaine charges will be completely dismissed if Mars manages to stay out of trouble for the next 12 months. On top of this, Mars must also undergo eight hours of counseling, complete 200 hours of community service, and pay a fine of $2,000.

Mars is scheduled to perform on the Hooligans in Wonderland Tour with Janelle Monae later this year, so here's hoping that the 'Grenade' singer doesn't blow his chance at freedom. If he does not comply with the judge's orders, Mars could face up to a year in prison.

More From PopCrush