Brooklyn rapper Bobby Shmurda will spend years behind bars.

The 22-year-old was handed a 7-year-prison sentence as part of a plea deal.

The rapper, who's real name is Ackquille Pollard, admitted to illegal weapon possession and conspiracy charges.

Schmurda and a dozen others were arrested in December of 2014.

Prosecutors say he was involved in drug trafficking and several gang-related shootings around the city.

Shmurda rose to stardom in July 2014 after a dance craze from one of his music videos went viral.