By TMZ

Someone in Tekashi69's crew allegedly fired a gun inside the Barclays Center this weekend, but it had nothing to do with Adrien Broner ... TMZ has learned.

Law enforcement sources tell us cops believe an unidentified member of Tekashi's entourage fired a shot inside Barclays Saturday night during an altercation with a rival rap crew headed by Brooklyn-based MC Casanova, who Tekashi's been beefing with online.

We're told police understand the situation as follows ... Tekashi and his guys were heading down a hallway in Barclays to hit up a VIP area in the arena, when they bumped into Casanova and company along the way. The two crews started pushing and shoving ... and someone in Tekashi's group allegedly discharged one round from a firearm.

Sources tell us a .32 caliber shell casing was recovered afterward, but it was not processed after it was touched by arena staff. We're told no one was hit by the shot, and both crews dispersed ... with Casanova and his pals fleeing the grounds entirely.

Tekashi and his crew stuck around, though, and they were all interviewed by investigators. Our police sources tell us no one in the group was found to have a weapon on them, however, and nobody was arrested. We're told cops think the man who fired fled the scene.

The silver lining -- if there is any -- is that this apparently had nothing to do with the ongoing beef between Tekashi and Broner, who were talking s*** to each other on social media in the week leading up to the fight.

Adrien did take a verbal shot at Tekashi after his match against Jessie Vargas was declared a draw ... but it sounds like Tekashi was preoccupied trying to avoid a real shot just outside.

Cops are investigating the matter for further information.