After sitting in jail for two years, Young Thug has pleaded guilty to gang, drug and gun charges in the YSL Rico trial. The 33-year-old rapper was indicted in 2022 for allegedly leading Young Slime Life, an Atlanta-based street gang that is accused of murder, armed robbery, drug dealing and carjacking, which Young Thug and his attorneys denied, the New York Times reported. He originally pleaded not guilty.

Young Thug, whose real name is Jeffery Lamar Williams, was indicted under the state’s Racketeer Influenced and Corrupt Organizations statute. According to NBC News, it is Georgia’s longest-running criminal trial in history.

“I take full responsibility for my crimes,” Young Thug said on Thursday in the courtroom, per Atlanta News First. “I am a smart guy; I am a good guy. I hope you allow me to go home and trust in me to do the right thing. I’ve learned from my mistakes.”

Gearing up for his release on house arrest, the Grammy-winning rapper was sentenced to 15 years probation and faces no prison time. Without the plea deal, Young Thug faced a 45-year sentence, with 25 of those years served in prison and 20 years on probation.

“I know you’re talented, and if you choose to continue to rap, you need to try to use your influence to let kids know that is not the way to go and that there are ways out of poverty besides hooking up with the powerful guy at the end of street selling drugs,” Judge Paige Reese Whitaker told Young Thug, per Billboard.

Co-defendants Quamarvious Nichols, Marquavius Huey and Rodalius Ryan accepted plea deals earlier this week after word got out of a potential mistrial.