GARDEN CITY, N.Y. - Justin Bieber has agreed to record a public service announcement on cyberbullying in order to resolve criminal charges filed against his manager and a record executive after a frenzy at a New York mall.

The case stemmed from an incident in 2009, when thousands of unruly girls turned up at a Long Island clothing store to see the teen pop star sign autographs. Police hadn't been expecting the crowd, and ordered the event cancelled.

Def Jam Records executive James Roppo was arrested after police said he refused to help disperse the crowd. Months later, police also pressed child endangerment charges against Bieber's manager, Scott Braun.

Braun hadn't been at the mall, but police said that when reached by phone he initially refused an order to send out a Twitter message to Bieber's fans telling them the singer wouldn't appear.

Prosecutors told a judge Friday that they are dropping charges against both men. The record company and a management company pleaded guilty to fire code violations.

In an interview with Newsday, Nassau District Attorney Kathleen Rice said she was happy with the outcome of the case.

"To have someone like Justin Bieber, who is emulated by kids his age across the world, educating people about the dangers of cyberbullying, that's invaluable," she said.