(TMZ) Former Queens of the Stone Age bassist Nick Oliveri just dodged a major bullet after his 4-hour standoff with a S.W.A.T. team last year -- cutting a MAJOR deal with prosecutors that will keep him out of jail.
Oliveri's lawyer tells TMZ, "Mr. Oliveri agreed to plead to one count of possession of cocaine and a dismissal of the remaining SIX felony counts."
If you recall ... Oliveri was arrested last July in L.A. after a fight with his GF resulted in a S.W.A.T. standoff. Cops eventually searched his home, and claim they found a loaded shotgun along with cocaine and methamphetamines.
The musician had faced up to 15 YEARS in the slammer for the combined charges -- but under the deal, he'll only get 3 years felony probation. Oliveri also agreed to 52 weeks of anger management and 200 hours of community service.
A judge signed off on the deal today, claiming if Oliveri stayed clean during the length of his probation, he'd expunge the entire case from Oliveri's record. Not bad. more on this story