Kodak Black attends the 2017 MTV Video Music Awards at The Forum on August 27, 2017 in Inglewood, California.

Kodak Black has avoided jail time in his sexual assault case involving a teenage girl from 2016 in Florence County, South Carolina.

ABC 15 News reports the 23-year-old rapper (real name: Bill Kapri), entered a guilty plea during a hearing in Florence County Wednesday in connection with an incident involving a teen girl in October of 2016 at a Florence hotel.

Kapri was sentenced to 18 months probation after pleading guilty to a lesser charge of first degree assault and battery. He was initially charged with criminal sexual conduct in the first degree and faced up to 30 years in prison, Complex reports. However, the victim agreed to the terms of a plea deal that Kodak ultimately accepted.

As part of the agreement, Kapri is required to get counseling, take full accountability for what happened, and apologize to the girl who accused him of rape in 2016.

The victim told authorities the assault took place inside a Comfort Inn and Suites hotel room following Kapri’s performance in Florence, South Carolina. The warrant for the rapper’s arrest stated he “forced the victim onto the bed in the room and then onto the floor of the room… The [defendant] removed the victim’s underwear” before penetrating her as she repeatedly told him to stop. Authorities said Kodak ignored the girl’s pleas and allegedly bit her on the neck and breasts.

Shortly after his sentencing, Kapri shared the following post on Twitter, suggesting he was pleased with the outcome.

He later tweeted: “My heart goes out to all the girls out here getting raped and s— FORREAL , But I Ain’t Did That S— #ImTooGangsta #TooFlyFaThat”

The following statement was shared with Complex on behalf of Kodak Black’s legal team:

“Today Bill Kapri took a plea to the legal charge of assault, a non sex offense, and received 18 months probation. This was a change of charge from the original charge. Having consistently denied these 5 year old allegations, he entered this plea in order to resolve the matter.”

About three years after the alleged sexual assault, Kapri was sentenced to federal prison for falsifying gun applications, but was commuted by former President Donald Trump before his leave of office in January.