Tekashi 6ix9ine scored a MAJOR victory in court Friday (Oct. 26) after a judge gave him four years probation (as his attorneys requested) instead of sending him to jail for his child sex case.

CBS News reports:

Judge Felicia A. Mennin handed down the sentence Friday, ordering Hernandez to refrain contact with gang members and must not be arrested during the probationary period. If he is found in violation of the plea agreement, he could face 1 to 4 years in prison.

In May 2015, Hernandez was arrested after video surfaced of him engaging in sexual acts with a girl at a party in Harlem. He was 18 years old at the time.

That October, he pleaded guilty to one count of using a child in a sexual performance. He took a plea agreement that required him to obtain his GED and complete mental health treatment for 2 years.

The agreement also prohibits Hernandez from posting any sexually explicit images of women or children and any images of violence against women or children to his social media accounts.

According to TMZ, when Judge Mennin gave Tekashi his sentence, the courtroom—which was filled with the rapper’s entourage—”erupted in cheers.”

Immediately following his sentencing, Tekashi spoke to the judge directly and “embraced his government name,” TMZ reported, saying that he’s Daniel Hernandez and not his rap persona Tekashi 69.

The rapper said: “I have millions of youth that look at me as a role model and the last place I want to be is incarcerated, they don’t deserve it. Thank you.”

The judge reportedly gave Tekashi credit for one year, so he only has three years of probation left and will not have to serve the full four years. Among the conditions of his probation, he was ordered to perform at least 1,000 hours of community service, not associate himself with any gang members and refrain from participating in any gang activity.

Tekashi nearly lost his freedom after he violated the conditions of an agreement he had with the judge to not get into any legal trouble.

The rapper previously wrote a letter to the judge claiming that his two arrests for assaulting an officer in Brooklyn and attacking a fan at a mall in Houston didn’t constitute a violation of his plea deal.

Tekashi’s attorney, Lance Lazzaro, even argued on his behalf that both arrests occurred long after the October 2017 deadline on his plea deal and he should only get four years probation and be ordered to participate in a youthful offenders program. Prosecutors recommended he get 1 to 3 years prison time, but the judge ultimately gave him probation.

A rep for Tekashi, err, we mean DANIEL, told TMZ that he “understands what he must now do moving forward and we will be with him every step of the way. We also want to thank the judge for being very fair and impartial.”

Be the first to receive breaking news alerts and more stories like this by subscribing to our mailing list.