Singer Justin Bieber waves from atop an SUV as he leaves the Turner Guilford Knight Correctional Center in Miami. Bieber was released from jail Thursday following his arrest on charges of driving under the influence, driving with an expired license and resisting arrest. Police say they stopped the 19-year-old pop star while he was drag-racing down a Miami Beach street before dawn. (ASSOCIATED PRESS / El Nuevo Herald, Hector Gabino)

MIAMI BEACH, Fla. (AP) — When he debuted five years ago, Justin Bieber was a mop-haired heartthrob, clean cut and charming. But a series of troubling incidents have put his innocent image at risk, and none more so than his arrest on DUI charges Thursday.

Police say they arrested a bleary-eyed Bieber — smelling of alcohol — after officers saw him drag-racing before dawn on a palm-lined residential street, his yellow Lamborghini traveling at nearly twice the speed limit.

Bieber was charged with DUI, driving with an expired license and resisting arrest without violence. His Miami-Dade County jail mug shot showed the singer smiling in a bright red inmate jumpsuit, his hair still stylishly coiffed.

He was arrested with R&B singer Khalil Amir Sharieff, after police say they raced two luxury vehicles down the street at 4:09 a.m., with two other vehicles apparently being used to block off the area.

Police Chief Ray Martinez said the singer was initially not cooperative when the officer pulled him over. Martinez said the singer also had an expired Georgia driver’s license.

Police said Bieber was driving the Lamborghini and Sharieff was driving a Ferrari. Both cars were towed. Police say Bieber was clocked at 55 to 60 mph in a 30 mph zone near a high school, youth center, golf course, city firehouse and small apartment buildings.

According to the arrest report, Bieber “had slow deliberate movements” and appeared to be in a stupor when the officer ordered him to exit his vehicle. Bieber was arrested after repeatedly refusing to put his hands on his vehicle so the officer could pat him down to look for weapons, the report said. It says he cursed several times at the officer and demanded to know why he was being arrested. At one point, Bieber said to an officer: “What the f--- did I do, why did you stop me?”

Bieber failed a field sobriety test and was taken to the Miami Beach police station for a Breathalyzer, police said. Results haven’t been released.

“I think this case will proceed hopefully as any other case would proceed,” said Bieber’s attorney, Roy Black, whose other celebrity clients have included Rush Limbaugh and William Kennedy Smith.

Under Florida law, people under the age of 21 are considered driving under the influence if they have a blood-alcohol content of 0.02 percent or more — a level the 5-foot-9, 140-pound star could reach with one drink.

For a first DUI offense, there is no minimum jail sentence and a maximum of six months, a fine of $250 to $500, and 50 hours of community service. For anyone under 21, there is an automatic six-month license suspension.

A Miami-Dade County judge set Bieber’s bond at $2,500 on Thursday afternoon. Sharieff’s bond was set at $1,000 for a DUI charge.

Bieber left jail about an hour after court, popping through a window of his black SUV in a black hoodie and sunglasses to wave to crowds of reporters and young girls waiting to see him. He reportedly spent far more money at a Miami strip club Monday night, when the King of Diamonds club tweeted that Bieber ordered $75,000 in dollar bills. The club’s operator later acknowledged that was an exaggeration, and that the singer only stayed about an hour.

Bieber and his large entourage were escorted to a closed-off section of the club. They enjoyed the dancers and ordered a large amount of bottled water, but no alcoholic beverages were sold to them, said Ricky “Disco Rick” Taylor in a statement.

“He had a lot of fun,” Taylor said. “We hope he returns again.”

The Canadian-born Bieber was only 15 when his platinum-selling debut “My World” was released. The singer from Ontario had placed second in a local singing contest two years earlier and began posting performances on YouTube, according to his official website. The videos caught the attention of a talent agent and eventually led to a recording contract.

He was positioned as clean-cut and charming — even singing for President Barack Obama and his family at Christmas — but problems began to multiply as he got older.

Bieber has been accused of wrongdoing in California but has never been arrested or charged. He is currently under investigation in a felony vandalism case after a neighbor reported the pop star threw eggs at his house and caused thousands of dollars of damage.

A neighbor had previously accused Bieber of spitting in his face, and a paparazzo called deputies after he said Bieber kicked him, but prosecutors declined to file charges in either instance. He was also accused of reckless driving in his neighborhood, but in October prosecutors refused to seek charges because it was unclear whether Bieber was driving.

His arrest in Miami is unlikely to affect the egg-throwing investigation, which included nearly a dozen detectives searching Bieber’s home last week searching for video surveillance and other evidence that could be used to pursue a vandalism charge.

Bieber is also being sued by a former bodyguard who says the singer repeatedly berated him, hit him in the chest and owes him more than $420,000 in overtime and other wages. The case is scheduled to go to trial in Los Angeles next month.

Bieber’s arrival in Florida earlier this week also is under investigation. Authorities in the suburban Miami city of Opa-locka are investigating whether the singer was given a police escort when he landed Monday at the Opa-locka Executive Airport.

Police escorts from the airport are not uncommon, but they must follow procedure because they involve city vehicles, Assistant City Manager David Chiverton said. Administrators had not authorized any escort for Bieber in this case.

“There’s a procedure,” Chiverton said. “These things must be approved, there’s a process.”

Despite all his legal troubles, the charges against Bieber likely won’t put him at risk of being deported or denied entry into the U.S., said immigration attorney Ira Kurzban.

According to U.S. immigration law, authorities do not revoke an individual’s visa unless the person has been convicted of a violent crime or has been sentenced to more than one year imprisonment.