MIAMI >> Justin Bieber has pleaded guilty to misdemeanor careless driving and resisting arrest charges seven months after his arrest in Miami Beach following what police initially called an illegal street drag race.

The 20-year-old pop star’s plea deal with prosecutors detailed at a Wednesday hearing includes a 12-hour anger management course, a $50,000 charitable contribution and court fines. The deal allows Bieber to avoid a driving under the influence conviction.

Bieber was not present at the hearing before Miami-Dade Circuit Judge William Altfield.