Justin Bieber agrees to anger management classes

Justin Bieber's mugshot

Justin Bieber's agreed to take anger management classes after pleading guilty to careless driving and resisting arrest in Miami.

The singer was held by police in Florida in January with singer Khalil Amir Sharieff after a street drag race.

Prosecutors agreed to drop a charge of driving under the influence in exchange for the guilty pleas.

Bieber's also agreed to pay court fees and give £30,000 to charity. He wasn't in court for the hearing.

Justin Bieber

The pair were arrested in Miami Beach but neither was charged with drag racing.

The singer will take anger management classes, make a $50,000 (£30,000) donation to charity and pay court-ordered fines.

The plea agreement does not ask him to spend time in jail.

Justin Bieber

When police arrested the singer, they carried out alcohol breath tests which showed he was below the 0.02 limit for underage drivers.

Urine tests revealed that there was marijuana and the anti-anxiety drug Xanax in his system.

He was also charged with resisting arrest and driving on an expired license.

Last month Bieber pleaded no contest to a misdemeanour vandalism charge for throwing eggs at a neighbour's house in LA.

Justin Bieber

He agreed to pay more than $80,000 (£48,000) in damages.

The 20-year-old is also charged with assaulting a limousine driver in Toronto. His lawyers say he is not guilty.

He is being sued in Miami by a photographer who says he was attacked while taking pictures of the singer outside of a recording studio.

Follow @BBCNewsbeat on Twitter and Radio1Newsbeat on YouTube