YG refused to follow orders and get out of his car during a traffic stop because he was afraid cops would do bad things to him.
Law enforcement sources tell us ... the rapper was cruising Wednesday night in his Mercedes-Maybach in Burbank when cops noticed dark tinted windows. We're told they asked YG for his driver's license and registration ... and that's when things went awry.
We're told YG replied with a simple "no." He was asked to get out of the car -- and same answer, "no." He told cops he just didn't trust them. The standoff continued with YG saying he was afraid police would hurt him if he exited the vehicle.
A bunch of patrol cars raced to the scene for backup and YG eventually got out. He had no ID and played the "do you know who I am" card.
YG was cited for having no ID, tinted windows and no license plates.
We've reached out to the rapper, so far no word back.