DJ Mustard had a brief run-in with the law while traveling through LAX. On Friday (Nov. 8), the hitmaker was detained by police after a TSA worker discovered a gun in a carry-on bag that went through the x-ray machine.

A source in law enforcement told TMZ that Mustard and his friend were about to board a plane when police confronted them. Apparently, Mustard and his friend walked away leaving the bag behind when they were detained by LAX police.

After individually questioned, police released Mustard but arrested his friend. The 27-year-old producer reportedly didn't have a clue that a gun was in the carry-on bag.

LAX security reviewed surveillance footage and determined it was Mustard's friend who put the bag on the conveyor belt. The friend was arrested and taken to jail.

Bringing a gun to LAX -- accidentally or otherwise -- is a serious offense. Depending on the situation, a person could face jail time and/or the TSA can issued a $10,000 fine for the crime.

There's no word if DJ Mustard was able to catch his flight or if he left LAX altogether. Reps for DJ Mustard had no comment on the matter.

50 Greatest West Coast Hip-Hop Artists of All Time