Big win for Patriots safety Patrick Chung ... the New England DB just cut a deal in his cocaine case -- and he will NOT have to go to jail despite a felony drug charge.
Court officials tell TMZ Sports Chung and prosecutors made an agreement Monday in which Chung's charge will be dropped if he meets several requirements.
Officials say Chung's got to keep his nose clean for 2 years, submit to random periodic drug testing and complete 40 hours of community service.
It's a sweet deal for the 32-year-old New England defensive back ... because he was facing up to 7 YEARS behind bars for the charge.
As we previously reported, Chung was busted back on June 25 after cops in New Hampshire say they discovered drugs in the Patriots player's possession.
Chung initially pled not guilty to the charge at a court hearing in August.
As for why prosecutors cut the deal ... they said in statement there were numerous factors that led to the agreement.
Prosecutors say Chung had no prior criminal record, he was fully cooperative with police, the amount of drugs they allegedly found on Chung were "small" ... and they also say Chung passed a substance abuse evaluation.
Chung is still subject to NFL discipline based on the league's personal conduct policy.
Chung -- who's been a key member of the Pats during their last four Super Bowl appearances -- is in the middle of a 3-year, $11.7 MILLION deal with New England.