Shmurda, has been jailed since December 2014 in a case where more than 15 defendants were charged with various crimes, including murder, attempted murder and drug dealing.

The rapper was charged with conspiracy to commit murder and several weapons and drug charges associated with gangs.

According to the deal, Shmurda will get 7 years in prison and 5 years probation.

A TMZ producer was in court, and heard Shmurda’s lawyer speak with his client and other defendants, imploring them to take the deal because they’d never get a sympathetic jury and they were facing life in prison.

Shmurda’s case became a cause celebre, where other rappers were calling for his release.