Lil Wayne faces up to 10 years in federal prison after he pleaded guilty Friday to illegal gun possession, prosecutors said.

Wayne had been charged with criminal possession of a firearm and ammunition as a prior felony offender. Prosecutors said the gold-plated, .45-caliber handgun carried in a bag on a private flight was loaded.

The rapper, whose real name is Dwayne Carter, entered the plea in Miami federal court, according to a news release from US Attorney’s Office for the Southern District of Florida.