Rapper Kodak Black was sentenced on Wednesday to more than three years in federal prison.

Black was arrested during the Rolling Loud hip-hop festival in May for alleged state and federal firearm violations. He has now pleaded guilty to knowingly making false statements in order to unlawfully acquire firearms from a Miami-area gun shop. Black obtained three weapons, a 9 mm handgun, a .380-caliber handgun and a semi-automatic Mini Draco pistol, according to the Associated Press. One of the guns was also found in Pompano Beach at the scene of a March shooting.

Judge Federico A. Moreno could have sentenced Black to a maximum of 10 years in jail, and prosecutors wanted eight years due to his involvement in a jail fight that injured a corrections officer. Black has had several previous arrests and currently faces drug, weapons and sexual assault charges in other states.

“I think it’s time for us to give some tough love in this case,” said Assistant U.S. Attorney Bruce Brown. “I just don’t see how and when he’s taken these things seriously.”

Moreno noted that Black donated money anonymously to charitable causes and could continue to contribute behind bars. “My suggestion would be you continue to be generous,” he added.

Black is a Florida native best known for his songs “Skrt,” “Tunnel Vision,” “Zeze” and “Roll in Peace.” He was born as Dieuson Octave, but now goes by the the legal name Bill Kapri.