Justin Bieber, seen here in booking photos, was drag racing in a yellow Lamborghini and had “choice words” for cops when pulled over, a Miami Beach police spokesman said. (Credit: Miami-Dade Corrections and Rehabilitation Department)

“What the f*** did I do? Why did you stop me?” Bieber asked the police officer who pulled him over just after 4 a.m., according to the arrest report.

Bieber, 19, was released from a Miami jail an hour after he made a brief appearance through a video link before a Miami judge, who set a “standard” $2,500 bond Thursday afternoon.

He strutted out of the jail dressed in black, with a baggy hoodie covering his head. His pants appeared to be baggy leather. Bieber briefly sat on top of a black Cadillac Escalade, where he waved to screaming fans, before he was chauffeured away.

At the bail hearing, the singer, dressed in an orange jail uniform, stood silently with his lips sometimes pursed as attorney Roy Black represented him in the hearing earlier.

Black told Judge Joseph Farina that he had been retained by Bieber’s manager. He said his partner had been denied access to Bieber in jail before the hearing.

Bieber “made some statements that he had consumed some alcohol, and that he had been smoking marijuana and consumed some prescription medication,” Martinez said.

A Miami Beach officer saw Bieber driving a yellow Lamborghini in a race against a red Ferrari in a residential area of Miami Beach, Martinez said. The cars were speeding at about 55 to 60 mph in a 30 mph zone, he said.

Sharieff posted a photo on his Instagram account of Bieber in the yellow Lamborghini with a woman behind the wheel early Thursday. “U know bizzle brought that lambo out,” he wrote in the caption.

Another posting showed a photo of a Ferrari steering wheel with the caption: “Miami nights ridin thru yo city in that hot wheel.”

A tweet posted Wednesday evening on Sharieff’s verified Twitter account linked to a video of him playing basketball with Bieber.

Bieber flew to Miami on Monday.

Other complaints

Another police department in the Miami area is investigating a report that some of its officers escorted Bieber’s caravan between Miami strip clubs this week without authorization.

Opa-Locka Assistant City Manager David Chiverton told CNN affiliate WSVN-TV that “at some point, the escort took them at least to two locations that we know of.”

“The police administration had no knowledge of this escort, and it is not the norm for those things to occur without the chief and his administration authorizing such escorts,” Chiverton told the TV station.

Thursday’s incident marks the first time the teen singer has been arrested, although he is under investigation on allegations of egging his California neighbor’s home.

Los Angeles County sheriff’s deputies used a felony search warrant last week to raid Bieber’s mansion in the felony vandalism investigation. They seized Bieber’s iPhone and the security camera system, which detectives have been examining for clues about who tossed eggs over a fence that splattered onto the next-door house, causing an estimated $20,000 in damage.

Deputies have also investigated reports by Bieber’s neighbors that he raced his expensive sports car down the streets of the exclusive Oaks community of Calabasas, California, but no charges ever resulted.

One neighbor accused Bieber of spitting in his face during a heated confrontation last March. Deputies have responded to complaints about loud parties at Bieber’s place.

The Los Angeles County district attorney’s office concluded it couldn’t prove the spitting or speeding cases in court, so it declined to prosecute.

Prosecutors also rejected a misdemeanor battery complaint from a photographer who accused Bieber of attacking him in the parking lot of a Calabasas shopping center as he was taking photos of Bieber and his then-girlfriend, Selena Gomez, in May 2012.

“We didn’t do this search warrant to send a message,” Sheriff’s Lt. David Thompson said last week. “That’s not what we do, but we hope maybe that understanding the gravity of this will change some of the behavior.”