Bhad Bhabie had a scary run-in with cops this week -- this after they swarmed in on her, thinking she might've been somebody they were looking for ... but it was a false alarm.
TMZ Hip Hop has obtained video of BB -- AKA, Danielle Bregoli -- surrounded by multiple police officers and squad cars Tuesday at a 76 gas station near Woodland Hills, CA ... a neighborhood just outside of L.A. proper.
Our sources tell us the rapper had been driving her Mercedes when she was tailed by 3 patrol cars as she pulled into the gas station -- and once she stopped, they pounced.
We're told Bhad Bhabie was detained for a brief period -- and the footage shows her standing outside talking to cops ... but she was ultimately let go after an investigation.
Law enforcement sources tell us ... officers were responding to a burglary radio call on the 4500 block of Winnetka Circle in Woodland Hills -- and we're told BB's Mercedes matched the description of the burglary suspect fleeing the area.
Once officers explained the situation, they gave BB and her boyfriend, Le Vaughn, their business cards. Our sources say BB was cooperative and there were no issues.
Someone in Danielle's crew ended up recording the altercation regardless, and you can hear one of the cops explaining the situation to her -- noting she wasn't a suspect, and that it was just a case of mistaken identity.
BB released a statement addressing the mix-up saying, "Yesterday we got pulled over by LAPD. They eventually released us and explained they were looking for a similar vehicle that matched the description of a car involved in criminal activity. We are okay but a bit shaken up. Luckily my daughter was not in the vehicle at the time."
As you know ... the couple just welcomed their first daughter in March -- and they now have a wild bedtime story for her when she gets a little older.