Bobby Shmurda has accepted a plea deal in his ongoing legal battle over a 2014 arrest and has been sentenced to seven years in prison.

During a court hearing on Friday (Sept. 9), the 22-year-old rapper, whose real name is Ackquille Pollard, joined co-defendants Chad “Rowdy Rebel” Marshall, and Nicholas McCoy in a global plea deal, meaning all three had to accept the terms the fer.

According to Billboard, Shmurda pled guilty to 4th-degree conspiracy and 2nd-degree criminal weapons possession. The conspiracy charge would have given him 1-3 years while the weapons possession charge would have earned him seven additional years. However, Shmurda will be allowed to serve both at the same time, landing a maximum seven years on his sentence.

Pollard will not be able to appeal this ruling based on his deal’s terms, but he will be given credit for time served. Since he was arrested nearly two years ago, in December 2014, there are at least five years left on his sentence. The rapper will also receive five years probation, according to TMZ.

Shmurda, Rebel, and McCoy’s lawyers pled with the three to take the deal “because they’d never get a sympathetic jury and they were facing life in prison.”

Shmurda has big plans for his future. The rapper has already announced two movies, one which will be a fictional story about his experiences leading up to his incarceration.