(CNN) — Young Thug was sentenced to time served as part of a sweeping case that originally included dozens of defendants.

The rapper, whose given name is Jeffery Williams, was released Thursday night after more than 900 days in custody, according to jail records. He will have to serve 15 years on probation as part of the non-negotiated plea agreement.

Williams entered a non-negotiated guilty plea deal Thursday related to several charges, including firearm possession and participation in criminal street gang activity, while he pleaded no contest to racketeering and leading a criminal street gang. The case marked the longest in Georgia’s history.

In 2022, Williams was charged alongside more than two dozen others under Georgia’s sprawling Racketeer Influenced and Corrupt Organizations Act — known as RICO.

Prosecutors accused the rapper of leading a criminal street gang that committed murder and a slew of violent crimes in Atlanta dating back a decade. Williams has denied that he was the head of a criminal enterprise.

They argued YSL — the acronym for the artist’s label, Young Stoner Life Records — also stands for Young Slime Life, an Atlanta-based criminal street gang affiliated with the national Bloods gang.

Prosecutors sought to prove Young Thug was the proclaimed leader of the YSL gang and was involved in crimes its members committed, including the 2015 fatal shooting of an alleged rival gang member. Young Thug had allegedly rented a car that was used by YSL members in the killing, prosecutors said.

Several other defendants charged in the case, including rapper Gunna, took plea deals or had their cases severed from the trial. Young Thug had been one of six defendants on trial together. The rapper had been in jail since his May 2022 arrest.

Williams pleaded guilty to six charges – one count of participation in criminal street gang activity, three counts of violating the Georgia Controlled Substances Act, one count of firearm possession during commission of a felony and one count of possession of a machine gun.

The two no-contest pleas meant he could still be sentenced for the charges as though a guilty plea had been entered though he did not contest the charges.

When the judge asked if he’d like to make a comment on Thursday, Williams said he takes full responsibility and apologized to his family before asking Fulton County Superior Court Judge Paige Reese Whitaker to let him go home.

“I am a smart guy. I am a good guy. I really got a good heart,” Williams told the judge as he stood before her. “I find myself in a lot of stuff because, because I was just nice or cool, you know, and I understand that you can’t be that way when you reach a certain height because it could end (badly).”

Williams added: “I’ve learned from my mistakes.” He mentioned some of the free concerts he’s hosted and money he’s given to single parents and related charities.

Before imposing a sentence, Whitaker told Williams, “I want you to try to be more of the solution and less of the problem.”

The case drew fierce criticism over prosecutors’ use of rap lyrics as proof of the gang’s actions and existence — a move some said was a racist violation of freedom of speech and artistic expression and the latest instance of Black art being targeted.

Williams told the judge Thursday he understood how rap music’s lyrics “can be twisted” and said he understood the impact they can have on people’s minds.

“I promise you, I’m 100% changing that,” Williams said.

Whitaker ordered that Williams remain away from the metropolitan Atlanta area beginning two days following his release from custody for the first 10 years of his probation. Williams is allowed to return to the Atlanta area for weddings, funerals and graduations but must leave within 48 hours of those events ending, according to Whitaker.

He is required to return to the area four times a year for each year of his probation to host an anti-gang and anti-gun presentation, the judge said.

Williams must also perform 100 hours of community service during each of his probation years and is not allowed to knowingly have any contact with members or associates of any criminal street gang, according to Whitaker.

Williams would have faced a maximum 120-year prison sentence if he was convicted on all charges.

The case had dragged on for months, including multiple motions for a mistrial, the most recent being last week. The jury selection process alone took nearly a year.

Three codefendants in the YSL racketeering trial have accepted plea agreements this week from the Fulton County District Attorney’s Office.

Rodalius Ryan, known as “Lil Rod,” and codefendant Marquavious Huey, known as “Qua,” entered guilty pleas Wednesday to charges of violating the state’s RICO Act.

As part of the terms, Ryan accepted a 10-year prison sentence, which was commuted to time served. Other counts in the indictment, including armed robbery, were dropped as part of the agreement.

Ryan is currently serving a life sentence for a separate murder case. The prison times will run concurrently, Whitaker said.

As part of his plea deal, Huey admitted guilt to multiple counts in the indictment, including armed robbery. He was sentenced to a total of 25 years, with nine years in custody, nine years on probation, and five years suspended as part of the agreement.

Quamarvious Nichols, also known as “Qua,” accepted a plea deal Tuesday for Count 1 of the indictment, conspiracy to violate the RICO Act. He received a negotiated sentence of 20 years, with seven years to be served in custody and the remaining years on probation. In exchange, multiple counts, including murder, were dismissed.

None of the three individuals who entered guilty pleas will be required to testify against the remaining codefendants, including the main target of the case, Young Thug.

The-CNN-Wire™ & © 2024 Cable News Network, Inc., a Time Warner Company. All rights reserved.

Join our Newsletter for the latest news right to your inbox