Pop singer Justin Bieber has pleaded guilty in absentia to lesser charges to resolve a criminal case.

The case was brought against him after police said he was caught drag racing on Miami Beach in January.

The agreement with prosecutors requires the Canadian singer to attend a 12-hour anger-management class, watch online videos about tragic drunk-driving cases and donate $50,000 to a children's charity.

As part of the deal, Bieber, 20, pleaded guilty to careless driving and resisting an officer without violence.

In return, the state dropped a driving under the influence charge.