The Weeknd has pleaded no contest in punching a Las Vegas police officer in January.

The singer entered his plea in Las Vegas court on Wednesday, TMZ reports, avoiding jail time so long as he comply’s with the judge’s orders. Per the judge’s ruling, the chart-topping R&B star née Abel Tesfaye will be required to complete anger management, an alcohol evaluation and 50 hours of community service, which he is being allowed to do in his native Canada. He will also pay $1,000 to an injured police fund.

Tesfaye was arrested in January on one count of misdemeanor battery of a protected person following an altercation inside Las Vegas’ Cromwell Hotel. According to a police spokesperson at the time, when law enforcement arrived and attempted to break it up, separating those involved, Tesfaye struck the officer in the side of the head with a closed fist.