(TMZ) - Justin Bieber was arrested for DUI ... TMZ has learned.

Law enforcement tells TMZ ... Bieber was busted in Miami Beach and it didn't end with a DUI ... he was also busted for drag racing. The arrest occurred early Thursday morning.

According to TMZ, 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. Law enforcement sources tell TMZ that 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. TMZ reports Bieber had just left a club and was driving a yellow Lamborghini at the time cops spotted him in a residential neighborhood. Sources tell TMZ the person Justin was racing was also arrested -- he was in a red Lambo.

According to TMZ, Justin had a passenger in the car -- a model. Based on the reports ... the traffic stop was for drag racing and cops determined he was driving under the influence.

Story developing. TMZ has video of the arrest .. see below!