Jermaine Dupri just learned a hard lesson -- take a chill pill when you're in Miami Beach and cops will swarm you.
Jermaine and his crew were cruising in Miami Beach at 3:24 this morning when cops pulled them over because the tint on their Lincoln was too dark.
According to the police report -- obtained by TMZ -- Miami Beach cops smelled "a strong odor of marijuana" inside the car.
That's when Jermaine -- who was a passenger -- and the others were patted down. Cops didn't find pot, but they DID find something that caught their eye ... a single Xanax pill in a plastic container, inside the pocket of one of Jermaine's friends.
Now get this ... Cops then requested K--9 dogs to sniff out contraband. In all, Jermaine says 5 cops cars arrived on scene, but turned up nada.
But it wasn't over yet. Cops were suspicious that the guy was in illegal possession of the pill. He insisted he had a prescription, but cops were suspicious. That's when someone in Jermaine's posse said he would go to the guy's home to get documentation he had a valid prescription. Time passed and the guy came back with the proof, and everyone went home.
Right after the incident, Jermaine tweeted, "Somebody please call TMZ. 5 police cars just pulled us over."
We heard you.
12:30 PM PST -- Jermaine tells TMZ ... he is the victim of "rapper profiling."
He believes cops followed him from the nightclub he had just made an appearance at ... and stopped him within minutes because he's a celebrity.
He thinks its ridiculous that cops called out the K9 unit and thinks it is massive overkill.
Miami Beach PD says the stop was legit ... and everything was done in accordance with procedure.