Cardi B pleaded guilty Thursday to two misdemeanor charges for her role in a 2018 bottle-throwing incident at a Queens strip club.
As part of her plea, Cardi B will avoid jail. She agreed to complete 15 days of community service.
The rapper, whose real name is Belcalis Almánzar, pleaded guilty to misdemeanor counts of assault and reckless endangerment.
If she fails to complete the community service, she will have to serve 15 days in jail.
"Part of growing up and maturing is being accountable for your actions," Cardi B said in a statement. "As a mother, it's a practice that I am trying to instill in my children, but the example starts with me. I've made some bad decisions in my past that I am not afraid to face and own up to. These moments don't define me and they are not reflective of who I am now. I'm looking forward to moving past this situation with my family and friends and getting back to the things I love the most -- the music and my fans."
The rapper appeared in court with two co-defendants, who also pleaded guilty to their roles. All three agreed to stay away from the two female victims.
"No one is above the law," Queens District Attorney Melinda Katz said in a statement. "In pleading guilty today, Ms. Belcalis Almanzar and two co-defendants have accepted responsibility for their actions. This Office is satisfied with the resolution, which includes appropriate community service."
The "Bodak Yellow" singer was one of 10 people accused of throwing bottles and chairs during an Aug. 29, 2018, incident at a strip club in Flushing, Queens.
She was charged with one count of misdemeanor assault for striking a bartender, causing a laceration to that person's foot and bruising the individual's legs. She was also charged with two counts of misdemeanor reckless endangerment for throwing items at the bartenders.
At the time, police said they were investigating whether one of the bartenders was having an affair with her husband, Offset, whose band was known to play at the club.
Cardi B, 29, has two children with Offset, whom she married in 2017 -- Kulture, 4, and Wave, 1. She filed for divorce from the Migos rapper in September 2020, only to cancel the filing two months later.
ABC News' Monica Escobedo, Mark Osborne and Angeline Jane Bernabe contributed to this report.