Lil Uzi Verttook a plea deal in an assault case involving his ex-girlfriend and fellow rapper SAINt JHN ... and he's avoiding time behind bars.
The Los Angeles County District Attorney's Office tells us Lil Uzi Vert pleaded no contest in court to one count each of felony assault with a firearm and misdemeanor injury to a girlfriend.
We're told he was sentenced to 3 years of formal probation, 1 year of treatment for mental health and substance abuse, 52 weeks of domestic violence counseling, restitution and a 10-year criminal protective order.
Lil Uzi Vert copped the plea deal after prosecutors charged him with 3 felonies -- assault with a firearm, criminal threats and domestic violence -- plus a misdemeanor charge of carrying a loaded firearm.
As we reported, the sources said Uzi threw a punch at JHN but missed ... and when Uzi fell down his gun fell out on the ground. We were told that's when Brittany got up from the table and approached Uzi and he allegedly hit her and pushed the firearm into her stomach.
Prosecutors followed through with criminal charges and Lil Uzi copped a plea.
We reached out to Uzi's camp ... so far, no word back.