Justin Bieber was arrested for DUI and it wasn't pretty -- cops say Justin was wasted and resisted arrest and cussed the cop out, dropping multiple F bombs ... TMZ has learned.
Law enforcement tells us ... Bieber was busted in Miami Beach and it didn't end with DUI ... he was also busted for resisting arrest without violence, drag racing and driving on an expired license.
Law enforcement sources tell TMZ ... they believe Justin was under the influence of both drugs and alcohol.
According to the police report -- obtained by TMZ -- cops approached Bieber's car and the instantly realized he reeked of alcohol and had bloodshot eyes. He had a "stupor" look on his face.
The police report says ... Bieber was defiant from the get go, yelling at the cops, "Why the f**k are you doing this? He also yelled, "What the f**k did I do. Why did you stop me?"
When the officer tried to perform a routine pat down, Bieber said, "I ain't got no f**king weapons, why do you have to search me? What the f**k is this about?"
We're told the resisting arrest charge stems from Bieber refusing to take his hands out of his pockets when ordered to do so by cops.
The arrest occurred early Thursday morning.
Bieber is now in custody and is at the police department where he is being tested -- presumably to more precisely measure his blood alcohol level. Our law enforcement sources say Justin was given a field sobriety test at the scene ... and failed.
His next stop will be jail, where he will be booked and processed and bail will be set.
We're told Bieber had just left SET nightclub and was driving a yellow Lamborghini at the time cops spotted him in a residential neighborhood. Our sources say Justin's people actually blocked the street off so Bieber could drag race.
Sources say the person Justin was racing was also arrested. We're told that driver was Khalil, a well-known rapper on Def Jam Records. He was in a red Ferrari.
Justin had a passenger in the car -- a model.
The traffic stop was for drag racing and cops determined he was driving under the influence.
The photo (below) is Chantel -- the model who was in Justin's yellow Lambo -- and Justin. The pic was NOT taken at the time of the arrest.