Kodak Black was grabbed by cops backstage at a popular Miami music festival before his scheduled performance ... and it's all because of warrants stemming back to firearms charges.
Law enforcement sources tell TMZ the rapper pulled up at Rolling Loud Saturday -- where he was to take the stage -- and both local and federal agents were waiting. We're told officers from Miami Dade and ATF were armed with both state and federal warrants.
Kodak was arrested on the spot and hauled off to the police station.
Our sources say all of the warrants he was arrested on were firearm related.
It's currently unclear if Kodak was armed at the time of his arrest.
Kodak will be in court to see a judge in Miami on Monday.