Play video content EXCLUSIVE TMZ.com

YG was swarmed by cops early Sunday morning and handcuffed for reckless driving, and the situation became tense.

The rapper was on his way to appear at 1 OAK during BET weekend at around 1:45 AM and cops claim he was speeding and weaving in and out of lanes on the Sunset Strip when cops lit him up.

This is where the situation became tense. L.A. County Sheriff's deputies claim YG became "upset and uncooperative and used profanities toward the deputies." They also claim he was "riling up the crowd," so they handcuffed him.

Cops began yelling at bystanders who were upset over the police response, telling some to "shut up."

Sheriff's deputies administered a sobriety test with a field breathalyzer and determined YG was not under the influence.