Bam Margera just avoided jail time in his DUI case ... instead getting probation, AA meetings and some fines and fees.
We broke the story, Bam was pulled over by the CHP back in January for being on his phone while driving. Cops detected a strong scent of alcohol on the "Jackass" star, he took a breathalyzer and failed and was eventually charged with two counts of DUI.
Law enforcement sources tell us he was hit with 3 years probation, has to attend an alcohol program, pay fines and fees, go to AA meetings and go through a "live in" program.
Margera checked himself into rehab shortly after the arrest.