American singer Azealia Banks has taken a plea deal to avoid jail time in an assault case from 2015.

The 212 rapper had been arrested by the LAPD for punching and biting the breast of a security guard after being evicted from a club.

ALSO: Facebook Bans Azealia Banks Over Racist Comments

She accepted the plea deal from prosecution before trial began, and will now have to attend anger management classes for a year. If she misses them, she could face jail for up to a year.

Banks’ attorney, John Vafa said: “After conferring and working with Ms. Banks’ New York criminal attorney, we were able to negotiate and accept a plea deal. Ms. Banks will participate in the ordered courses by the district attorney and the judge for 26 weeks.”