US rapper Young Thug to be released from jail in plea deal twist
"I take full responsibility for my crimes, for my charges," Mr Williams told the court.
"To really everybody that has got something to do with this situation, I want to say sorry."
In a five-minute speech, he described himself as "a good guy with a good heart" who found himself "in a lot of stuff because I was just nice or cool".
"And I understand that you can't be that way when you reach a certain height because it could end bad... and it could fall on you."
Prosecutors had planned to recommend a sentence of 45 years, including 25 in custody and 20 on probation.
But the plea negotiations were unsuccessful, and Superior Court Judge Paige Whitaker instead chose his punishment, commuting his sentence to the time he has already served, paving the way for his release.
“I want you to try to be more of the solution and less of the problem,” Judge Whitaker told him.
As part of the deal, Mr Williams pleaded guilty to one gang charge, three drug charges and two gun charges.
He also entered a no-contest plea to leading a gang and violating the state's Racketeer Influenced and Corrupt Organizations (Rico) Act, meaning that he decided not to contest those charges and accepts punishment for them.
Judge Whitaker additionally stipulated 100 hours of community service, a ban on contact with gang members or former co-defendants, and a prohibition from remaining in the metropolitan Atlanta area for the first 10 years of his 15-year probation period except under special circumstances - including weddings, funerals and the anti-gang and anti-gun presentations he is required to host four times a year.
Thursday's change of plea likely brings to an end a multi-defendant case that was plagued by multiple delays, courtroom disturbances and motions for mistrial.
When the man known to his fans as "Thugger" was arrested in May 2022, prosecutors charged him and 27 associates at his rap label - Young Stoner Life (YSL) Records - with conspiracy to violate the Rico Act, famously used in mafia prosecutions.
Arguing that YSL in fact stands for a criminal gang called Young Slime Life, they tied the men - including fellow rap superstar Gunna - to a series of felony offences, including murder, armed robbery and carjacking in the streets of Atlanta.
But the indictment drew widespread outrage over prosecutors' use of YSL rap lyrics as evidence of the gang’s actions and criminal intent. Critics argued the charges violated the rappers' freedom of speech and were part of a growing assault on a black-dominated art form.
Several of Mr Williams's co-defendants took plea deals or had their cases severed, and one even had his charges dropped after an unrelated murder conviction - and, by the time the trial began, only six defendants remained.
Jury selection began in January 2023 and lasted nearly 10 months.
In July this year, the trial was put on hold indefinitely after Mr Williams's lawyers asked a previous judge to recuse himself over misconduct allegations.
The lawyers said Fulton County Superior Court Judge Ural Glanville held an "improper" meeting on 10 June when he met privately with prosecutors and a key witness.
They claimed Judge Glanville sought to pressure the witness into testifying and the lawyers pressed him to recuse himself, motions which the judge had denied.
Mr Williams's lead attorney, Brian Steel, was also found in criminal contempt in June this year after refusing to reveal how he got to know about the meeting.
The trial also saw a number of unusual incidents, including the arrest of a Fulton County deputy for allegedly attempting to smuggle contraband to a defendant.
In another instance, the court's Zoom account was hacked into by an apparent supporter of Mr Williams who yelled "free Thug!".
Earlier this week, three of Mr Williams's co-defendants in the case took plea deals.
The remaining two defendants in the case, Shannon Stillwell and Deamonte Kendrick, reportedly plan to move ahead with their trials.