EXCLUSIVE

Ty Dolla $ign Prosecutors Will Drop Drug Case ... If He's Clean for 13 Weeks

Ty Dolla $ign's scored a huge win in his Georgia drug possession case -- his record will be wiped clean, IF he keeps his nose clean for the next few months.

According to court docs obtained by TMZ, Atlanta prosecutors struck a deal last week with the rapper: he'll enter an online drug prevention program, and lay off weed and Rx drugs ... then all charges -- 2 felonies and a misdemeanor -- will vanish.

Georgia calls it the Second Chance program, and we're told it typically lasts 13 weeks. Ty will also be subject to random drug testing during the program.

You'll recall ... an Atlanta grand jury indicted Ty after cops busted him back in September, allegedly finding pot and cocaine in his bag.

Sources connected to the case tell us the deal was struck after Ty's attorney, Steve Sadow, met with prosecutors to point out weaknesses in the case.

Based on the end result, it appears that's mission accomplished.

Click here for info about our online advertising practices.