Bruno Mars has cut a deal with the Clark County District Attorney's Office, in which Mars will not have a conviction on his record for his Las Vegas cocaine arrest ... TMZ has learned.
Sources tell TMZ ... the D.A. has agreed to a "deferred adjudication" -- translation ... if he stays out of trouble for 12 months and does a little community service, it's like nothing ever happened.
Mars was arrested in September at the Hard Rock Hotel and Casino, after a bathroom attendant ratted him out and told security there was a man in a stall doing drugs.
Under the deal, which attorney Blair Berk orchestrated with prosecutors, Mars will do 200 hours of community service and undergo private counseling.
At the end of the 12-month period, the felony will be officially dismissed.