The pop star’s attorneys told Clark County District Court Judge Jessie Walsh their client met the conditions of a plea deal that was reached nearly a year ago and steered clear of trouble, the Associated Press reported.

Judge Walsh dismissed the case against the Grammy award-winning singer.

Mars admitted to possessing 2.6 grams of cocaine when he was arrested in a Vegas bathroom back in September 2010 after a performance at the Hard Rock Hotel & Casino in Las Vegas, according to AP.

On Feb. 16, Mars plead guilty to cocaine possession, but the judge postponed the acceptance of his plea. Instead, the "It Will Rain” crooner was placed on probation, hit with a $2,000 fine, eight hours of drug counseling, and 200 hours of community service.

The Grammy award-winning singer volunteered with unspecified health-related organizations and children's charities throughout his completed community service, attorney Blair Berk told the press Tuesday. Mars was grateful for the opportunity he was given as a first-time offender to have the felony charge dropped, Berk added.