MIAMI, FL (AP/WBTW) – Rapper Kodak Black pleaded guilty to federal weapons charges.

A hearing was Thursday in Miami federal court.

The decision comes months after an original plea of innocence. Prosecutors in May charged the 21-year-old rapper for crimes that involve falsifying information on federal forms to purchase three firearms.

Prosecutors say one of the weapons purchased by Black was found at the scene of a South Florida shooting.

A federal judge denied his request for bond saying he was “danger to the community” based on his lengthy criminal record. Black has remained in a federal detention center in Miami since his arrest.

Authorities say he could face up to eight years in prison.

The rapper, known for singles “ZeZe” and “Roll in Peace,” also faces drug, weapons and sexual assault charges in other states.

Back in May, 12th Circuit Solicitor Ed Clements was seeking to detain Black in Florence on charges of first-degree criminal sexual conduct, from November of 2016. Black, whose real name is Bill Kapri, was accused of raping a woman after a concert. He was released on a $100,000 bond.