MIAMI — Rapper Kodak Black was sentenced Wednesday to more than three years in federal prison after pleading guilty to weapons charges stemming from his arrest just before a scheduled concert performance in May.

The 22-year-old Black admitted in August that he falsified information on federal forms to buy four firearms from a Miami-area gun shop on two separate occasions.

Black was able to obtain three of the weapons: a 9 mm handgun, a .380-caliber handgun and a semi-automatic Mini Draco weapon. Authorities said one of the guns was found at the scene of a March shooting in Pompano Beach, although he has not been charged in that case.

Black also faces drug, weapons and sexual assault charges in other states that remain pending. He has had several previous arrests.

U.S. District Judge Federico Moreno could have sentenced Black to the maximum of 10 years, and prosecutors wanted eight years in part because Black allegedly was involved in a jail fight that injured a corrections officer.

“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.”

But Moreno noted that Black has given money anonymously to charitable causes and could continue to do so behind bars.

“My suggestion would be you continue to be generous,” the judge said.

Black is a Florida native who was born to Haitian American parents as Dieuson Octave and who now goes by the legal name of Bill Kapri.

He was arrested during the Rolling Loud hip-hop festival in May that was marred by several violent incidents, including an unrelated shooting at a seaside property owned by President Donald Trump. Black has remained in custody since then his arrest.

“I have made some decisions I’m not proud of making,” Black said in court. “I do take full responsibility for my mishap.”

Black's better-known singles include "Skrt," ''Zeze", "Roll in Peace", "Tunnel Vision", and "No Flockin."