Justin BieberDetained In AustraliaDuring Airport Drug Search

12/5/2013 10:05 AM PST

Justin Bieber -- Detained In Australia -- During Airport Drug Search

Justin Bieber and his entourage were detained at the Brisbane, Australia airport while customs agents looked for drugs ... and TMZ has learned they allegedly found weed on one of Justin's pals.

The Australian Federal Police tell us ... a 19-year-old man was detained back on Nov. 24 ... but was released after getting a stern warning for using "inappropriate language." He reportedly swore at the officers.

Sources connected with the incident tell us Justin was the one with the potty mouth.

The AFP says a security check turned up an unknown amount of pot on a 23-year-old man in Justin's entourage. The suspect was released, but got a ticket for allegedly importing drugs.

Sources close to Justin tell us the suspect had a disposable vaporizer -- basically an electronic device to smoke marijuana -- which had residue in it.

We're told an attorney for the suspect appeared in court today, and paid the fine.

It's been one helluva tour -- as we first told you ... one of JB's bodyguards was arrested last month in Hawaii after allegedly attacking a photographer on the beach -- and was also caught on video attacking a photog in Sydney.