3:57 PM PT -- Blueface's attorney, Alex Kessel, tells TMZ, "Video evidence demonstrated the police misidentified Blueface possessing a gun. Justice prevails through video evidence, a fair judge and a bulldog attorney. A rapper prevails on the merits of the case, not his celebrity status."
Rapper Blueface can breathe a sigh of relief ... he will NOT be prosecuted in his felony gun case ... TMZ has learned.
Blueface appeared in an L.A. court Wednesday afternoon where a court official tells us his case was tossed due to insufficient evidence. That's obviously great news for the rapper ... who had his suspicions about the case from the get-go.
TMZ broke the story ... Blueface claimed the LAPD targeted him because he's black. LAPD had initially said they were in DTLA patrolling an area ravaged by burglaries and they were there to offer protection. The concern, cops said, was that there were robberies in that area by gang members and cops were worried the rappers were easy targets.
LAPD had said Blueface and several others scattered and tossed their guns when they saw cops arriving ... but Blueface from the start called BS. His lawyer said Blueface was never in possession of a firearm.